Claude keeps committing your rejections to git history, so this dev built a hook to stop it
chufan_shi · reddit · 2026-09-15
Developer chufanshi noticed Claude keeps leaving conversational residue in code: rejected features show up as "without backoff" in commit messages, test names like testparserwithoutregex, and comments like "// iterative, as you asked". His diagnosis: it's not a negation problem — many residues contain no "no" at all — it's that Claude writes for the person in the chat, not the future reader of the file.
His fix, the open-source ship-the-result project, ships three pieces:
- A SKILL.md with the rule and a test — would this line make sense a year from now with no chat access? — plus guidance on distinguishing real requirements (e.g. "Allow login without password for SSO users") from residue.
- A scanner script flagging six kinds of residue.
- A PreToolUse hook that runs the scanner on git commit and gh pr create, covering staged comments, test names and new filenames; on a hit it blocks and explains why. Re-running the same command and passing confirms a real requirement. He made it a hook because prompt rules fade after 40 turns, but regex doesn't. Installable with a one-line curl command.
More from coding & agent
- One stale date silently broke a WhatsApp reply agent: 19 messages unanswered — petrusenko_max · 2026-11-02
- The 10X engineer is now just a SKILLS.md: 6 workflow rules for AI coding agents — mdancho84 · 2026-11-02
- Auditing my MCP credential broker: the worst hole was the config file — Relevant_Mousse_9117 · 2026-11-02
- AWS's open-source Strands Harness claims 45% cheaper than Claude Code, reigniting harness debate — blaizedsouza · 2026-11-02
- Xiaomi MiMo's CodeSpecWeave trains coding agents on interdependent specs for long-horizon coding — XiaomiMiMo · 2026-11-02
- Sketchy v0.1.6: AI diagrams use 29% fewer output tokens than plain text — Nkgsporty · 2026-11-02