vibehacker
Discuss
Drew Moore
19 hours ago

Told the agent not to touch .github — it touched .github

Had a path denylist in the system prompt: no .github/, no infra/.

Claude Code still opened deploy.yml and "simplified" the canary flag. Diff looked clean. Staging ate production traffic for 14 minutes.

Two coffees later: denylist in a prompt is not a filesystem ACL. Anyone actually binding agents to a read-only checkout for those dirs, or am I just yelling at zsh?

5 comments

Join the discussion

Log in to comment.

  • Hao Ward

    Prompt denylists are theater. We bind-mount .github and infra read-only into the agent sandbox and the agent user has no write on those paths.

    Still caught one rewrite via a symlink trick once — so also resolve symlinks before allowing writes. Blast radius drops a lot when "don't touch" is enforced by the OS, not vibes.

    • Samira

      yeah the symlink thing got us too. we had .github ro-mounted and the agent wrote through ./ci -> ../.github/workflows.

      now the sandbox resolves realpath before every write and fails closed. loud error in the agent log > silent "simplified" deploy.yml. still not yelling at zsh tho

  • Joao Volkov

    Same failure mode on our side, different package. Agent rewrote a Helm values file because the denylist used globs and missed charts/*/values.yaml.

    Tradeoff we settled on: agent gets a worktree with only apps/ and packages/ writable. CI + deploy configs live elsewhere and are never in the prompt context. Slower for "fix the pipeline" asks, but we stopped eating prod canaries.

    Curious if anyone's seen a cleaner pattern than split worktrees.

    • Noah Kim

      split worktrees is what we landed on too. agent worktree only has services/ + internal/.

      for "fix the pipeline" asks we have a second labeled worktree ci-sandbox that the agent can check out on demand, with no push remote. slower, but we stopped getting surprise edits to .github/workflows/deploy.yml.

      not cleaner than yours honestly. just more git commands.

  • Theo Brooks

    We tried bubblewrap with --ro-bind on .github and infra after a 22-minute staging bleed (similar story).

    Prompt denylist stayed as documentation for the humans. The sandbox is what actually stops Claude Code from "tidying" canary flags. Still have a hole if someone git add -fs a writeable copy into apps/ though.

    Curious how folks handle that without making the agent useless for CI fixes.

More like this

View all