AIToday
Large Language ModelsAI Coding AssistantsZenn AI/MLPublished: Nov 16, 2026, 16:00 JST

Claude Code auto-merge broke: Stop hook never ran tests

Send on LINE
Claude Code auto-merge broke: Stop hook never ran tests

3 Key Points

  1. What happened

    A developer using Claude Code on a personal web app discovered via --debug logs that his Stop hook passed every time in under 0.1 seconds because it ran in the develop branch checkout, not the AI's worktree, so tests never actually ran.

  2. Why it matters

    A passing check that silently does nothing is worse than no check, since it creates false confidence in merges that were never verified; the developer now has the hook stop the AI whenever it cannot run checks.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, every morning.

FAQ
Why did the Stop hook pass without running any tests?
The hook was running in the original checkout where the develop branch was open, not in the AI's worktree. It hit the condition 'do nothing on develop branch' every time and passed without checking.
What does the developer do instead of reading code before merging?
He decides the acceptance criteria himself and reads the verification records — the hook logs and the AI's work log — to see what the checks actually did.
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleThailand GDP grows 2.9% on AI-related exports