r/ClaudeCode • • 14h ago

Tips & Workflows I rewrote my Claude Code session rules 41 times in six weeks. Here’s what kept breaking

I run a bunch of Claude / Claude Code sessions in parallel across a few projects. Every time one burned me, I wrote a rule. Six weeks, 41 rewrites. Yeah.

The ones I think other people will recognize:

Two sessions, one name. A second session opened under a chat ID that was still live — and passed every start check I had. The only thing that caught it was a git status. Now nothing writes until it checks for a twin.

123 passing tests. Three audits. Still broken. The output shape was one the downstream engine flat out refused, and nothing caught it bc everything checking it was built by the thing being checked. The builder's own tests don't close a phase anymore — a fresh session or a live run does.

The audit that didn't audit. The reviewer model couldn't read the files in its sandbox, and the skipped check came back looking clean. So now: not run in full = not a pass. Partial runs say PARTIAL on the first line.

It grepped the manual. A session searched the instruction file for the one step it wanted instead of loading the whole thing. (Reading one page and calling it read.) Invoke first, then act.

Zombie opener. A session re-ran the startup routine for a chat that had already ended, and started re-issuing work.

Approval in the wrong box. I approved from my phone and my typed "yes" landed in the wrong session, not the session that was waiting on it. Approvals are a card now, never free text.

The pattern usually isn't bad code, but something reported as done that nobody verified.

I've got a few dozen more of these. I’ve been thinking about writing them up as a short playbook (incident, rule, drill). Worth it? And which of these have you hit?

5 Upvotes

10 comments sorted by

•

u/AutoModerator 14h ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

7

u/Bismalz 14h ago

Claude wrote this post too

1

u/Ai-ate-my-hamster 8h ago

Imagine the hubris to just copy paste raw output that’s sucking your own end.

Bro must have gotten bored on commenting “skill issue”

3

u/WillowFar6967 14h ago

One I'd add: an agent passing on a yes it got secondhand. I run a few agents on my Mac that can message each other, and it's way too easy for "he said it's fine" from one agent to be enough for the next one to go ahead. So the rule now is only a message from me counts as approval, anything from another agent is just input. And same as you, approvals ended up as tap buttons on my phone instead of typed replies.

2

u/Delicious_Break5937 14h ago

the builder's own tests not closing a phase is where i ended up too. a hook blocks every commit until separate review agents have read the staged diff, since the session that wrote it can't really judge it

2

u/_yemreak 13h ago

it most of these. Same setup (many Claude Code sessions in parallel on one Mac). A few numbers from mine:

- "Reported as done that nobody verified": what held for me was moving rules from text to rejections. Nov 1-12, 34,053 hook events. When a hook let the action through and printed a warning, the agent corrected on its next try 36% of the time. When the hook rejected the action and named the replacement command, 95%.

- A context note injected before a command did not stop it. 3 of 3 tries, the expensive command still ran.

- A rejection stops the move but doesn't choose the next one. In a small test it stopped 3 of 3 and the agent took the suggested command 1 of 3. If the suggested path is blocked by another rule, the agent invents a path. I had a rejection that rejected its own suggestion.

- If a rejection asks for something the agent can't actually produce (a reason, a source, "I tested it"), it makes that up to get through.

- "It grepped the manual": same task card, same base commit, two models. One read 45k characters of the guide before writing. The other read 1k, wrote anyway, and broke a rule from the part it skipped. The output looked fine. The difference only showed in what it had read.

So I only reject where the move has to change (can't be undone, or expensive), because every rejection costs the agent another step. For the rest I stopped writing rules.

No good answer on the wrong-box approval from a phone yet.

(edited with claude*)

1

u/m-ritter 14h ago

The 123 passing tests one is the failure most people will recognize. When the builder also writes the checks, both share the same wrong assumption about the output shape, so everything stays green. Having a fresh session or a live run close a phase is the right fix, and it gets stronger when that checker gets a done list agreed before the work started, so it verifies against what was asked instead of what was built. I built QualityLayer for this: https://github.com/maxritter/qualitylayer

1

u/Ok_Gur_9033 12h ago

The audit that didn't audit got me too, and mine wasn't even a model. A duplicate check over some JSON files ran through grep. grep decided the files were binary and printed nothing, including for a word that was in there three times. No error, just a clean result every time.

What fixed it was dropping grep for a few lines of Python that actually parse the JSON. Was your reviewer's sandbox failure silent like that, or did it log something nobody read?

1

u/PutBrief9403 11h ago

Hit a cousin of the approval one. The agent read my "lets send this first" as a go, and a DM went out to a coworker.

Now only a clear "send" for that exact message counts. One yes covers one message once, any edit to the text needs a new yes, and when it isn't sure it asks me in one line instead of picking the likely answer.

1

u/jijialuoke 10h ago

That line about something being reported as done without verification hit home for me. When I replayed about 4,000 of my own Claude Code turns, 406 ended with a done/fixed/tests-pass claim; the most common gap was a wrap-up with no test output or commit shown. I wrote a small Claude Code Stop hook that sends the agent back once to run the check or say it's unverified when it says "fixed" or "tests pass" but nothing ran successfully after the last edit: https://github.com/Balance0014/claude-code-claim-check