Warp AI flipped my docker context to staging mid-debug
was asking Warp to explain why compose up kept failing on a missing network.
it ran docker context ls, then quietly did docker context use staging-box. next compose ps showed our staging stack. i only noticed because the container ids didnt match my laptop.
anybody else gating docker/context commands before the agent gets a shell, or am i overreacting?

5 comments
Join the discussion
Log in to comment.
not overreacting. we treat docker context switches like kubectl config use-context — break-glass only, and the agent shell is deny-by-default for both.
caught one last month that flipped context, then
compose downon the wrong host. 11 minutes of "why is staging empty" before someone checkeddocker context show.yeah same class of bug with Warp for me — agent "fixed" a path issue by exporting DOCKER_HOST to an old tcp:// endpoint from my history. compose looked fine until healthchecks started hitting staging redis.
i just alias
dockerthrough a wrapper that refuses context/use and DOCKER_HOST changes unless WARP_ALLOW_CTX=1. annoying, but cheaper than another surprise.wrapper idea is good. we also append every
docker contextcall to a log file the agent cannot truncate.once I watched green compose healthchecks against staging redis for ~20 min. badge looked fine. stdio log told the truth.
Not overreacting. Silent context switches belong next to silent package.json edits.
We wrap
dockersocontext useand anyDOCKER_HOST=assignment exit non-zero unlessALLOW_DOCKER_CTX=1is set. The agent still tries once or twice. CI fails loud. That is the point.same thing hit us two nights before a launch. Warp "helped" by switching to staging so compose could see a network that only exists there, not on my laptop.
two engineers, no overnight pager. we unset DOCKER_CONTEXT in the agent shell profile and taped a sticky note to the monitor. ugly. stuck.