Guides

Codex stops before finishing: what to check

Diagnose a Codex task that ends with work still open: check the active contract, permissions, rollout, SessionEnd, and genuine service or usage limits.

Updated

SHORT ANSWER

Why does Codex stop before finishing its tasks?

If Codex gives a final answer with approved boxes open, check that Nightshift was started in the real project; its stop hook should return the remaining contract. A permission wait, SessionEnd, dead process, service error, or compaction has a different remedy.

01

Identify the signal that ended the turn

Compare Codex's last message with .nightshift/punch-list.md and the shift log. A normal completion with open items points to contract or hook setup. A permission prompt requires host permission review. SessionEnd can represent a close, archive, or idle unload and pauses recovery. A crashed process without SessionEnd may be eligible for watchman recovery; a live API wedge is conservatively left alone.

  • A usage limit or service error needs host availability; the gate cannot bypass it.
  • A compacted conversation is still a running task: reload the on-disk checkpoint.
  • STOP and completed shifts are declared endings.
02

Make Codex keep working until the list is done

Install Nightshift, open the persistent project, ask it to set up the workspace, approve the rules, and write each outcome with Verify and Commit lines. Then ask it to start. A repository shift making commits needs Codex permissions to write Git metadata. Use Status or Doctor to check that the shift is armed and which session owns it.

Set up Nightshift in this project. Add these approved tasks to the punch list with a Verify line for each. Show the rules before starting.
Start the Nightshift shift.
03

Check what Codex finished

Illustrative example: if a test repair is ticked but the docs item stays open, an ordinary stop should return the docs item. If the host closed with SessionEnd, Start re-arms after you review the state. Same-conversation crash revival requires a recorded resumable Codex task identity; an unrelated ChatGPT handle is not substituted. Review checks and diffs behind every tick.

Codex host setup ↗Compaction continuity ↗Crash recovery ↗
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.

Diagnose the Codex last event, open Nightshift boxes, SessionEnd, rollout evidence, and host permissions before restarting.
BOUNDARIES

What this workflow does not claim

  • A service or usage limit cannot be bypassed by the stop hook.
  • Same-conversation revival needs a recorded resumable Codex task identity.
SOURCES

Evidence and sources

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

How Nightshift worksHost differences, process leases, state files, workspace layouts, guarantees, and limits.Open evidence ↗Troubleshooting decision treeRead-only diagnosis and host-specific recovery guidance.Open evidence ↗Workflow contractThe shipped one-item loop, decision boundary, gates, recovery, and clock-out behavior.Open evidence ↗
RELATED QUESTIONS

Continue from the question you have

Codex compaction continuityRead the answer →Codex crash recoveryRead the answer →bounded coding task listRead the answer →