I kept running Claude Code on long, multi part tasks overnight, and kept coming back to a summary that ended with an offer: "Want me to continue with the rest?" or "Once you approve it, I will run the tests." Nobody was there to answer, so the job stopped with work still owed.
Anthropic's own prompting guide for Opus 5.5 names four ways this happens: announcing the next step instead of taking it, offering to continue, listing decisions for the user that do not actually block the work, and treating a milestone as a good place to stop. I kept seeing all four in headless runs.
What it does
cliffhanger is a Stop hook plus a skill for Claude Code. On every Stop and SubagentStop event it reads the agent's own checklist, built from TaskCreate and TaskUpdate calls, the latest TodoWrite list, or a Markdown to do list the agent wrote in that turn. If items are still open, it blocks the stop and names what is left. It lets a real stop through: a line that names a blocker, background tasks still running that will wake the session later, plan mode, or a cap of three automatic continuations per user turn so it cannot loop forever.
Does it work
I ran a benchmark: 12 multi part tasks (write code, update tests, run the full suite) on a small app, with a restrictive tool allowlist that only permits pytest, not python -m pytest. Under that allowlist, Claude Sonnet 5.5 skipped running the suite before its first stop in 6 of 12 baseline runs, usually right after a refused test command. With cliffhanger active, 0 of 12. The cost went up about 4 percent, mostly the extra turn it takes to run the suite before stopping.
The regex detector behind the early stop patterns, tested alone against the first final message of all 48 runs in the benchmark, caught exactly the 6 runs that skipped the tests and flagged none of the other 42. That is a small sample from one model on one fixture, and the method and raw tables are in the repo rather than just claimed in the README.
What is rough
It only helps with Claude Code's Stop hook today, though an AGENTS.md version ships for agents that read plain instructions instead of hooks. The early stop patterns come from one failure mode on one fixture, so I expect to add more as they show up elsewhere.
cliffhanger is free, MIT licensed, and has no dependency beyond Python's standard library.

Top comments (0)