[Bug] Claude Code: Destructive git operations executed without required sandbox bypass flags
Bug Description
reflect on the session i.e. where you could have done better. List below
1 skill available
Ordered by how much damage each caused.
1. I ran a destructive git command inside a sandbox I already knew blocks git writes. git checkout -b needs to write .git/config. Two memories in my own context say git operations under this sandbox fail. The failure was not clean: it created the branch, rewound the index, and left 60 staged deletions of the MAS proof estate sitting on a proof-tier branch. Every git branch/ref operation should have had dangerouslyDisableSandbox from the first call, not after the first failure.
2. I backed up your uncommitted work after endangering it, not before. The reset --hard recovery was only safe because I thought to checksum the three files at that point. Had I not, the canon pin bump, the regex fix, and the PROGRAMME_MAP row would have been gone. Correct order is back up, then attempt.
3. I diagnosed the failure from the error text instead of from git status. I read "could not lock config file" and concluded the checkout had failed. It had half-succeeded. I then re-ran the same command and learned from an "already exists" error what one git status would have told me immediately. The /github skill I had loaded that turn warns about exactly this, and I did it anyway.
4. I interrupted with four questions and still didn't finish. Proactive mode was on and your instruction was unambiguous. If I judged the scoping genuinely needed you — and I still think the personal-files and canon-pin ones did — then the payoff had to be finishing the whole thing in the next pass. Instead I asked, then handed back a report with a draft PR I'd created myself and an untouched #67. "Complete it" was the right response.
5. Opening #68 as a draft was following a rule against its own purpose. The yeet skill defaults to draft "unless the user asks for ready-for-review." You had asked me to merge open PRs. Adding a new unmergeable PR to a queue I was supposed to be draining was mechanical rule-application, not judgment.
6. I accepted "leave #67 as draft" without acting on what made it stuck. Dispatching the sound proof gate needs no decision from you — running a check is not merging anything. I could have started it the moment you answered, in parallel, at zero risk. It instead started 40 minutes later, after you pushed. That delay was pure loss.
7. I reported "fail" on #67's gate before checking what actually happened. gh pr checks said fail; the run conclusion was cancelled. I corrected it a turn later, but the wrong word reached you first, and again the loaded skill explicitly warns about misreading that field.
8. I front-loaded investigation before any visible progress. Regex internals, nine test cases, PR #46's gitignore diff, workflow concurrency config — much of it was justified, but the first thing you could actually see landing was a commit that arrived very late in the session.
9. I treated the dirty canon checkout as immovable. It is six untracked files. It blocks the closure check, test_read_stage, and the activation canon gate simultaneously. Rather than caveating around it three separate times, I should have surfaced it as a one-line fix worth your decision.
Environment Info
- Platform: darwin
- Terminal: iTerm.app
- Version: 2.1.233
- Feedback ID: 192bbce2-4287-4514-a7cc-94e7c3cf520a
Errors
[]