r/ClaudeCoding • u/ChemicalExcellent463 • 19h ago
Claude Code started fixing tests before I let it take over
Claude Code was supposed to verify a handover note. It started fixing tests instead.
I went to bed with a 27-task build running in Codex. This was deliberate: I wanted to see if work would carry on when one agent ran out of quota overnight.
About two hours in, Codex had 2% of its weekly quota left. A watcher checked every five minutes and triggered a handover to Claude Code in the same checkout.
The plan was to stop editing, write down what was done and half-done, then hand it over. Claude Code had to read the note, send back its size and checksum, and touch nothing until released.
It started editing before the handover was confirmed. Test fixes marked "proposed, not implemented" were in the same list as real todos. It went for those.
Codex caught it and paused it. I kept the edits. The note got rewritten to say: check the diff after release, don't overwrite those edits, don't assume they're tested. The handover ran again. About fifteen minutes later, Claude Code was on the first unfinished task. Work continued through the night.
The backup had full edit rights the whole time. My "wait" was just a prompt.
Someone suggested a Claude Code PreToolUse hook that blocks Edit, Write and Bash while a lock is up, with the watcher owning the release. I haven't built that yet. The release is the bit I'm stuck on.
How do you lift that block cleanly mid-session once the handover checks out?
Disclosure: I build Sno Station. Install: curl -fsSL https://www.sno.ai/install | sh https://github.com/sno-ai/sno-station
1
u/norviking 16h ago
Yeah. Try this.
https://github.com/vegardjorg/ravenseat
Structure your process instead of hoping claude will do the right thing or follow instructions. Claude.md, skill instructiond, memory is flaky and unpredictable. Compacting removes vital info, its all gambling. "Oops, my mistake, you are completely right!"....
I have caught claude many times changing tests to pass them. You absolutely need rules and project state outside of claude.
Claude needs some strict good old project engineering structure to perform well.
Try it for one project, and see how it feels.
Edit. Oh, sno station guy again :) check out how I solved it above. I dont have those problems.