Four rules that make my Claude Code agents finish the job
A Stop hook that wants evidence, an advisor at three checkpoints, a model for each job, and gates that run on my machine. What each rule is, and what it costs.
Agents rarely lie on purpose. Most of the time they just stop early: the plan says five things, three got done, and the summary still says “done”.
I stopped fighting that with longer prompts. Instead, four rules live in my ~/.claude folder and apply to every session. Each one is small. Together they decide when an agent is allowed to say it is finished.
Rule 1: no evidence, no “done”
Every bigger task starts with a plan file that ends in an acceptance list. An item is only done when the line carries proof: the command I ran and the output that settled it.
- [x] typecheck clean — evidence: tsc --noEmit → 0 errors
- [x] login works in the browser
- [ ] deploy checked on the live URL
When the agent tries to end its turn, a Stop hook reads that list. An empty box is open. A ticked box with no evidence: on the same line is also open. If anything is open, the hook refuses the stop and the agent keeps working.

The whole check is one regular expression:
UNPROVEN_RE = re.compile(r'^\s*[-*]\s+\[[xX]\]\s+(?!.*evidence:).*$', re.M | re.I)
Two details keep it from becoming a trap:
- Progress resets the budget. Ticking an item with proof starts the count again. After three continuations with no new tick, the hook lets the agent go. A stuck agent is released, not looped forever.
- It fails open. Any error inside the hook returns “allow”. A broken hook must never lock a session.
The effect I care about: “done” now comes with something I can check in ten seconds.
Rule 2: a stronger model at three checkpoints
My main session runs on Opus 5.5. A stronger model, Fable, sits next to it as an advisor. It reads the whole transcript (every file read, every command, every result), but only at three moments. This is the line from my CLAUDE.md:
Consult the advisor before locking a plan, after the same error twice, and before calling a task done.

Why these three:
- Before a plan locks. A wrong plan wastes every step after it. This is the cheapest place to catch it.
- After the same error twice. The second identical failure means a loop, not bad luck. Fresh eyes beat a third try.
- Before “done”. It is the last chance to spot the item that was skipped or the claim that was never checked.
Between checkpoints the main model works alone, so the expensive reads stay rare. In practice the advisor’s most useful output is a short list: “you did not verify X”, “this file you edited has a second caller”, “the user asked for Y too”.
Rule 3: the right model for each job
Not every step needs the best model. Reading search results does not. Checking a diff does.

- Opus 5.5 runs the session: plans, decides, and reviews every diff.
- Fable is the advisor from rule 2.
- Haiku 5.5 subagents do read-only lookups: map the repo, find call sites, pull API docs.
- Sonnet 5.5 runs every other subagent, code edits included.
A PreToolUse hook enforces the last line. If a subagent is started with any other model, the hook rewrites it to Sonnet. I do not have to remember the rule; the harness does.
The result: the model that costs the most never reads grep output. It reads summaries and diffs.
Rule 4: no green badge to hide behind
GitHub Actions is off on every repo I own. This is the one-line command I run on a new repo:
gh api -X PUT repos/<repo>/actions/permissions -F enabled=false
The gates did not go away. They moved to my machine, and an agent has to run them before a merge.

The third gate is the one that matters: run the real flow the way a user would. Click the path in a browser, submit the form, call the endpoint, read what comes back. A green CI badge proves the tests passed. It does not prove the feature works. Without a badge, the agent cannot point at one and call the task done.
Deploys run by hand, and the last check is a curl against the live URL.
What this costs
These rules are not free, and I would rather say so:
- More tokens at checkpoints. The advisor reads everything, three times per task. On small tasks I skip it.
- Slower merges. Running the real flow takes minutes that a badge would not.
- More writing. Every evidence line is a sentence somebody has to write.
What I get back: fewer “done” messages that turn out to be half done, and much less time spent re-checking work I was told was finished.
Copy the core of it
If you only take one piece, take the acceptance list with evidence. Put this in your CLAUDE.md and keep the format strict:
## Done = evidence
- Every acceptance item is ticked with `— evidence: <command → decisive output | screenshot path | URL>`.
- A tick without evidence counts as open.
- Testing a feature means running it end to end the way a user would, then fixing what that shows.
The hook makes it automatic. The rule alone already changes what “done” means.
Written by Brandon Ta
I'm a builder and writer in Ho Chi Minh City and the founder of Brandon Ta Labs. What I make, what I write and how I work.
Comments
Join the conversation: share your thoughts, ask questions, or talk with other readers below.