Preserve yielded Code Mode execution cells across native goal continuations
Open 💬 0 comments Opened Jul 19, 2026 by amirfish1
Summary
A yielded Code Mode execution cell can no longer be waited on after an automatic native goal continuation starts a new turn.
Minimal reproduction
- Start a Code Mode execution that yields a running cell ID.
- Allow an automatic native goal continuation to begin a new turn before calling
wait. - Call
waitwith the previously returned cell ID.
Expected
The yielded cell remains addressable for the logical session, or the continuation returns a durable handle that allows the caller to retrieve its final output.
Actual
wait reports that the completed execution cell cannot be found. Re-running the same command entirely within one turn succeeds.
Evidence
- The original execution was still owned by a live Codex process and its code-mode host; this was not a process exit.
- Cell numbering reset at the automatic continuation boundary, consistent with state being scoped to the prior logical Code Mode session.
- The issue reproduces when a continuation occurs between yield and wait, and does not reproduce when wait runs in the same turn.
Impact
Long-running diagnostics lose their final output across an automatic goal continuation. The current workaround is to keep the yield and wait in the same turn; no global disabling of goals or Code Mode is requested.
Environment
Observed with Codex 0.144.4 on macOS.