Repository navigation
Description
Request
@tibo-openai — during the 28 Days of Shipping, could the Codex team prioritize durable unfinished work as a first-class product guarantee, and clarify whether there is a roadmap for it?
I use Codex for long-running engineering work that includes code edits, delegated agents, builds, and tests. Recent Selected model is at capacity failures exposed a deeper problem than the absence of an automatic retry button: after an execution turn dies, typing "continue" can start a new turn that tries to reconstruct and take over the unfinished work. That is not equivalent to resuming the original job.
The central invariant I want is:
An unfinished user-authorized objective remains an unfinished Job, regardless of whether its current model inference, turn, process, or client is still running. A model turn ending is not evidence that the work is complete.
This is not just a request for more retries, transcript restoration, or uninterrupted inference. Model instances may be disposable; the work identity, authorized objective, verification criteria, and committed progress should not be.
Proposed behavior
- Separate Job identity from Thread/Turn. Persist the original objective, acceptance criteria, status, outstanding work, checkpoints, and parent/child assignments. Threads/models can detach and reattach to the same unfinished Job.
- Allow interruption at any time. User pause, capacity failures, quota boundaries, connection loss, compaction, application/process restart, and model replacement should preserve the unfinished Job. A deliberate Cancel must be distinct from Pause. Unrecoverable/unsafe cases should be shown as blocked with a reason, not silently marked completed.
- Resume the same work rather than issue a fresh "continue" prompt. Recovery may invoke new model inference, but it should be a continuation owned by the same Job, anchored to its persisted task state, not a new conversation guessing what the previous agent intended.
- Revalidate reality before acting. The repository, working tree, files, runtime processes, and test results may have changed during suspension. Compare current workspace state to the evidence/versions on which the checkpoint relied; invalidate stale assumptions and replan affected steps. Do not overwrite external edits just to replay the old plan.
- Preserve effects and approvals. Record completed tool effects separately from pending/uncertain actions. Never blindly replay a write, start duplicate processes, or bypass consent on recovery. For uncertain external effects, reconcile the environment or ask.
- Keep multi-agent continuity. A suspended coordinator and its children should have recoverable ownership and completion states. If children cannot be resumed, expose that explicitly and let the same Job safely reassign their remaining work.
- Make the status visible.
running,suspended,recovering,blocked,unfinished,completed, andcancelledshould not be conflated with the last chat turn's status. Provide a Resume action targeting the actual Job ID.
I am deliberately leaving the concrete data model to the Codex engineers. This could build on Goals, or on a separate durable Work/Job primitive; the invariant and observable behavior matter more than the specific implementation.
Suggested acceptance test
- Start one long-running Job, with a coordinator and child agents. Complete a file edit and a verified build; leave a later test unfinished.
- Interrupt the model turn (including an overload without
Retry-After), then kill/restart the Codex process. - While suspended, externally modify a file the next step depends on.
- Reopen Codex. The same Job ID must still exist and be marked unfinished; its goal, completed work, pending tests, and child states must be identifiable without interpreting a handoff summary as authoritative.
- Resume that Job. It must detect the changed file, revise stale assumptions, avoid replaying the completed edit/build or duplicating external effects, and continue pending verification.
- Mark the Job completed only after its acceptance criteria have actually been checked, or mark it blocked with a specific reason when safe continuation is impossible.
Recent progress and why this is still needed
I appreciate that Codex has already shipped pieces of this:
- Preserve turn attribution across recovery and compaction #51402 preserves turn attribution across recovery/compaction.
- Allow root turn suspension with live descendants #54414 allows suspension of an unfinished root turn with live descendants, but says interrupted descendants are not automatically recovered.
- The Day 11 / Oct 15 capacity changes aimed to make overloaded requests eventually continue.
Those are valuable incremental fixes. They do not by themselves establish the general unfinished Job survives arbitrary interruption with workspace-aware revalidation contract above. This matters just as much when I choose to pause intentionally as when servers are busy.
Related: #48596 (intent-preserving continuity), #48144 (work identity independent of thread), #50238 (capacity queue), #41798 (Goal state not restored after retry), and #8573 (deterministic checkpoints / stale facts).
Could you please confirm whether the team plans to make this a supported end-to-end capability, and, if so, what milestone we should track? As models become better at multi-hour autonomous engineering, losing the identity and continuity of unfinished work is a more fundamental limitation than inference speed or a fresh usage reset.
Activity
github-actions commentedon Oct 20, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
bluehorizon8848-ai commentedon Oct 21, 2026
I’ve been working on a similar problem with Codex/OpenCode. Keeping task state and checkpoints outside the agent session helps, but recovery needs more than restoring context. The tricky part is checking what actually completed before retrying, especially when a tool call may have succeeded but its result was lost.
crornia commentedon Nov 16, 2026
Adding a specific macOS desktop use case to this request:
When I need to close my MacBook, go offline, or temporarily interrupt a long Codex run, the current prominent Stop action feels too final. I would like an explicit Pause for later action for ordinary in-progress tasks, not only for tasks configured as Goals.
Desired UX:
The most important distinction is Pause ≠ Cancel/Stop. I want to intentionally leave and return without worrying that the agent will forget the work, silently end the task, or burn effort repeatedly reconnecting. I realize model inference itself may not be literally frozen; durable task-state continuity and a truthful resume status would solve the user problem.
Related functionality in Goal mode is helpful, but this needs to be a discoverable, reliable interaction for any running desktop task.
liuhh666233 commentedon Nov 23, 2026
Adding a same-thread case from the Codex TUI on Linux x86_64 with GPT-6.2 Sol. The session was created with CLI 0.170.0, and the installed CLI at diagnosis was 0.171.0.
The local rollout marked A as interrupted and recorded the confirmation as a new turn. The sequence stayed within the same context window. The client recorded 451 items in the request history, which matched a local reconstruction that included the original request for A.
I'd like to keep A visible as paused while I work through B in the same thread, then resume A with its original scope, completed steps, and next pending step. That would let me investigate a prerequisite and return to the release without having to restate the plan.
dijarvrella commentedon Nov 24, 2026
WorkLedger gives the unfinished work a task ID outside the Codex thread. The objective, acceptance checks, decisions, open steps and recorded delivery evidence stay with that task. A Codex turn can end while the task remains open; a connected successor session can read the same record and pick up the remaining work.
We build WorkLedger at Digital Disruptors. It addresses the durable work-identity part of your request through a separate shared work record. It does not suspend or restore the Codex process, and the next agent still needs to check the current files and reconcile uncertain external actions before continuing.
If that separation would help with your long-running engineering work, you can try it with one task and a fresh supported coding session:
https://workledger-ai.com/early-access?plan=starter&utm_source=github&utm_medium=referral&utm_campaign=wl-durable-work-20261124
jsibitoye commentedon Dec 1, 2026
Adding a runnable synthetic acceptance fixture for the uncertain external-effect part of this request, based on my independent continuity/checkpoint work.
The failure window is: a destination commits an operation, the worker exits before recording the result, and the original local journal is subsequently unavailable. The retained checkpoint still identifies the intended action. Recovery needs evidence about the destination before it can decide what happens next.
Connection to current Codex behavior
At
9a8b299471fb645d2c2b6d6191d465bdfe4642e3, history normalization supplies anabortedresult for certain restored calls whose output is missing. The interruption guidance already warns that commands may have partially executed or still be running. The proposal here is a durable outcome record that makes that uncertainty actionable during recovery. I have not reproduced a duplicate effect in Codex.The general external-effect boundary is also explained in the Agents SDK crash-recovery guidance. The additional acceptance cases below cover loss of the local journal and matching the recovered evidence to the exact operation, account, destination and payload.
Suggested contract
Executable cases
The fixture below uses a separate SQLite file as a simulated destination. A child process commits one effect and exits with
os._exit(86)before returning a completion result. The test removes the entire original local-state directory, then recovers the intent from a separately retained file. The simulated destination deliberately allows duplicate effects, so the control detects an unsafe replay.Observed locally: 5 tests passed, 0 failures, on Linux with Python 3.12.14. Save the code below as
continuation_acceptance.pyand runpython continuation_acceptance.py -v. It uses the standard library, disposable files and no network access or credentials.This is a small contract model, not a Codex implementation or end-to-end regression test. It models abrupt process exit after a committed write, not power loss, concurrent dispatchers or all possible network failures. The fake provider supplies durable, trustworthy records; a real integration must establish its own authentication, evidence completeness, identity/version rules, atomicity and retention. This simulator uses positive integer IDs/versions; other providers may use different valid representations. The fixture does not supply a production persistence format or a universal exactly-once guarantee. Unknown outcomes can remain blocked when the destination cannot resolve them.
Two further acceptance boundaries from the checkpoint work belong alongside these cases: restoring an older source snapshot must preserve later requirements/action confirmations, and a backup's later successful-transfer receipt must be stored separately with the backup's identity, digest and explicit state/event cutoff. The five tests below do not exercise those additional boundaries.
Would this operation-outcome contract and these acceptance cases fit the recovery work tracked here?
— Josh
Standalone synthetic fixture (Python 3.12+)