Guides

Claude Code stops early: what to check

Distinguish an early Claude Code completion from permission waits, API failures, owner stops, and limits before changing a Nightshift shift.

Updated

SHORT ANSWER

Why does Claude Code stop before finishing the task list?

First identify the stopping condition. If Claude Code declares completion while approved items remain open, Nightshift's Stop hook returns the punch list. A permission prompt, API error, clean close, or owner Escape needs a different response.

01

Read the last event before changing anything

Read the last host message and .nightshift/shift-log.md. An ordinary final answer with open boxes suggests early completion. A tool approval prompt means permissions are waiting; review the host permission choice. An API 500 or 529 is a service failure; inspect recovery state. Escape or STOP is an owner interruption and should remain honored.

  • No active shift marker: run Start after reviewing the list; a checklist alone does not arm the hook.
  • Open item with a failed gate: fix the failure or record the actual blocker.
  • Usage or service limit: wait for host availability; a stop hook cannot grant more capacity.
02

Make Claude Code keep going until the list is done

Install the plugin, run /nightshift:setup in the real project, write approved outcomes with Verify and Commit lines under ## Items, and run /nightshift:start. The Stop hook then refuses an ordinary clock-out while boxes remain, presenting the contract again. Try a small attended run before leaving it overnight.

/nightshift:setup
# Review .nightshift/punch-list.md and its ## Items
/nightshift:start
03

What the stop hook can and cannot prove

For example, if item 1 is ticked and item 2 is still open, an attempted normal stop returns item 2. If the agent incorrectly ticks item 2, the hook cannot inspect the implementation and certify it. Use sharp definitions of done, checks, commits, and morning review.

Write a bounded list ↗Diagnose an API 500 ↗
TRY IT

Start with a bounded prompt

This prompt names the outcome and preserves Nightshift’s review boundary. Paste it into the supported coding host from the project you want to change.

/nightshift:setup
/nightshift:start
BOUNDARIES

What this workflow does not claim

  • The hook checks open approved boxes, not the implementation behind a tick.
  • Escape, STOP, permissions, service failures, and limits require separate handling.
SOURCES

Evidence and sources

These links support the released behavior, public outcomes, or problem language described on this page.

Workflow contractThe shipped one-item loop, decision boundary, gates, recovery, and clock-out behavior.Open evidence ↗How Nightshift worksHost differences, process leases, state files, workspace layouts, guarantees, and limits.Open evidence ↗First-night checklistThe attended checks required before trusting an unattended run.Open evidence ↗
RELATED QUESTIONS

Continue from the question you have

write a Claude Code task contractRead the answer →Claude Code API Error 500Read the answer →Claude Code overnight setupRead the answer →