Guides
Keep Codex on task after context compaction
Give Codex an on-disk continuation point before a long session compacts: completed work, rejected paths, exact next action, and verification still due.
Updated
Does context compaction end a long Codex task?
Compaction can shorten the conversation Codex sees; it does not mean the task has ended. Keep the approved list and current work pointer in project files, then read those files and recheck the working tree after compaction.
Before: a summary loses the execution point
Illustrative example: Codex has fixed a parser, rejected a broad API rename, and still needs to run the parser tests. A conversation summary that says only 'improve parsing' invites another investigation or an accidental repeat. Put the finished change, rejected rename, exact next command, and remaining acceptance in durable state before that boundary.
Current item: Reject malformed input without changing the public API.
Done: parser branch updated; focused fixture added.
Rejected: renaming parse() would break callers.
Next: run npm test -- parser, fix any failure, inspect diff.
Still due: verify valid input path and write item receipt.After: resume from the files
After compaction, read punch-list.md, the active item receipt or opportunity-map.md when that shift uses one, and the current Git diff. Re-run the named check before ticking. Completed boxes stay completed; the next action is explicit rather than inferred from a compressed chat summary.
- Approved scope remains in the punch list.
- Decisions and rejected paths remain in their respective records.
- A check claimed in earlier conversation is revalidated against current files when needed.
Compaction, early stops, and crashes are different
Compaction is a context change inside a continuing task. An attempted early stop with open items is handled by Codex's stop hook. A dead process requires watchman evidence and a resumable identity for same-conversation revival. None of these mechanisms restores missing turns or proves a checked item's quality.
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.
Record the active Codex item, what is done, rejected paths, exact next action, and verification still due in Nightshift project files.What this workflow does not claim
- Nightshift does not change Codex compaction or restore missing conversation turns.
- Compaction is distinct from an early stop or a dead process.
Evidence and sources
These links support the released behavior, public outcomes, or problem language described on this page.