Claude Code Stop Gate — Development skill for Claude Code
Stop gate hook for Claude Code — nonce-based confirmation prevents accidental session termination, enables overnight autonomous work.
How to install Claude Code Stop Gate
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open evnchn-agentic/claude-code-stop-gate and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude Code Stop Gate does
Stop gate hook for Claude Code — nonce-based confirmation prevents accidental session termination, enables overnight autonomous work.
Alternatives in Development
- Cashclaw — An autonomous agent that takes work, does work, gets paid, and gets better at it 973 ★
- Stop Review Gate — You are reviewing uncommitted changes before the author finishes their turn 664 ★
- Taskmaster — Stop hook for Claude Code that keeps the agent working until all plans and user requests are 100% complete 494 ★
README
⚠️ DEPRECATED — no longer needed on Claude Opus 4.8+
The silent-stop failure this hook guarded against (the model ending a turn text-only when the task still needed a tool call) was **fixed model-side in Opus 4.8**, not in the Claude Code harness — so the guard is now redundant on 4.8+. Keep it only if you run **Opus 4.7 or older**, where the failure mode returns and you'd be unguarded.
**Full bisect (harness vs model) + evidence:** https://github.com/evnchn-agentic/claude-code-stop-gate/issues/2
This repo is **archived** as a deprecated reference. The hook still works.
claude-code-stop-gate
**One script that prevents Claude Code from accidentally ending a session -- enabling true overnight autonomous work.**
The agent said "continuing overnight work" but the loop ended because no tool call was made. This hook fixes that.
The Problem
Claude Code's agentic loop ends when the assistant produces a response with no tool calls. An agent can *intend* to keep working but phrase its response as text ("I'll continue overnight") instead of making a tool call -- and the session silently dies.
The human wakes up to find nothing happened.
The Fix
A `Stop` hook that fires every time Claude tries to end its turn. It:
- Generates a random nonce and blocks the stop
- Reminds Claude with a 6-point checklist (see below)
- Requires explicit confirmation -- Claude must include
STOP_CONFIRMED_to actually stop - If Claude has more work, it just continues with a tool call -- no confirmation needed
The nonce prevents Claude from pre-generating the confirmation string. It must genuinely decide to stop *after* seeing the reminder.
The Checklist
When the hook fires, Claude is reminded to:
- Review task list -- any incomplete tasks?
- Review user messages -- did you miss anything?
- Continue overnight work -- make a tool call if work is queued
- Clean up background commands -- terminate any that ar
Related Skills
Nonstop
Autonomous work mode for Claude Code. Pre-flight risk assessment, blocker decision framework, session-scoped s
Autonomous Overnight
Run a scoped autonomous work session that can continue without human supervision, queuing irreversible operati
Device Wipe
Wipe or retire a device in Intune — choose Full Wipe (work-owned) vs Retire/selective (BYOD), with a destructi
Plugin Doubt Gate
Claude Code Stop hook plugin that detects uncertainty in assistant messages and requests verification
Loopgen Rs
Agentic loop runner for Claude Code — turns a goal into an iterative claude -p loop with a LOOP_STATUS termina
Scvd Store Execution Contract
A behavioral contract for autonomous work. Name the success criteria before acting, spend the cheapest evidenc
Related Agents
Merge Analyst
Pre-merge analyst subagent. Inspects branch divergence, diff stat, conflict markers, and overnight-state consi
Kit Verifier
Use proactively when a contract is implemented and tests, observations or a pioneer confirmation exist — the s
Transcript Inspector
Specialist agent for diagnosing stop hook failures by reading Claude Code session transcripts. Use when the st