Repository navigation
fix(codex): keep sessions open on a refused name and start in the session directory - #627
Merged
Merged
Conversation
…sion directory Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 5, 2026
Merged
stamp-build Bot
added a commit
that referenced
this pull request
Nov 5, 2026
<!-- stamp:review:v1 --> <sup><img src="https://api.raft.build/api/avatars/pixel/bXVn.svg" width="16" height="16" align="absmiddle" alt=""> <b>Cindy</b> from open-agent-runtime opened this pull request through Stamp</sup><br><sup><a href="https://stamp.build/review?receipt=prc_b6cea2eb70db20fefc1fe4212bbebdaf"><picture><source media="(prefers-color-scheme: dark)" srcset="https://stamp.build/assets/brand/stamp-glyph-dark.d907ffcadb44.svg"><img src="https://stamp.build/assets/brand/stamp-glyph-light.58a2c10ed108.svg" width="13" height="12" align="absmiddle" alt=""></picture> View in Stamp →</a></sup> --- <!-- /stamp:review:v1 --> Patch release: a host can use its own, newer Pi executable, Pi sessions recover from a refused prompt, and two Codex startup problems are fixed. ## Explicit Pi RPC commands (#626, fixes #621) - `createPiRuntime({ execution: "subprocess", command })` now accepts stable Pi **1.4.0 or newer**, not only the exact version OAR bundles, so a user's upgrade of `pi` no longer stops a host from opening sessions. - This is a compatibility floor, not a claim that every future release is tested. Native controls passed on explicit 1.4.0 and 1.5.0 on Linux x64; older explicit versions are unverified on macOS and Windows. - A missing, unparsable or older version throws `RuntimeFailureError` with `failure: "invalid_request"`, naming the actual and required versions. It was a plain `Error` before. - The default path without `command` still requires OAR's exact bundled Pi. ## Pi SDK and RPC recovery (#617) - A prompt Pi refuses before starting no longer strands queued input: the refusal is recorded and the queue drains. - A cancellation requested for a refused prompt no longer ends the next run. - On RPC, an abort during the terminal statistics window no longer kills a healthy child about 10 seconds later. - On SDK, disposing during pending admission now answers `disposed`, and a late failure cannot settle a later run started by an extension. ## Codex startup (#627) - A refused thread name no longer fails the open. Older app-servers lack `thread/name/set`, so every start with a `name` failed on them. Codex's error is now recorded as a `thread/name/set/error` frame with no events; a lost connection still fails. - The app-server now starts in `SessionOptions.cwd` rather than the host's directory, so stdio MCP servers and a relative `CODEX_HOME` resolve there. - **Behaviour change:** a session directory that does not exist now fails the open with `Codex session directory does not exist`. Codex 0.163.0 accepted that open before. ## Documented limits - Synchronous next prompt from a `turn_ended` observer stays unsupported on Pi SDK and RPC: status can read `idle` while `prompt` returns `busy`. Submit after the observer returns. The reasoning and what would reopen it are in `docs/design/decisions.md`. - Extension-handled input can leave status provisionally `running` with no native run; the gate itself still accepts the next input. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Cindy <[email protected]>
stamp-build Bot
added a commit
that referenced
this pull request
Nov 5, 2026
<!-- stamp:review:v1 --> <sup><img src="https://api.raft.build/api/avatars/pixel/bXVn.svg" width="16" height="16" align="absmiddle" alt=""> <b>Cindy</b> from open-agent-runtime opened this pull request through Stamp</sup><br><sup><a href="https://stamp.build/review?receipt=prc_04ba216a4e248f6de33c6afee827ef5f"><picture><source media="(prefers-color-scheme: dark)" srcset="https://stamp.build/assets/brand/stamp-glyph-dark.d907ffcadb44.svg"><img src="https://stamp.build/assets/brand/stamp-glyph-light.58a2c10ed108.svg" width="13" height="12" align="absmiddle" alt=""></picture> View in Stamp →</a></sup> --- <!-- /stamp:review:v1 --> `codex-session-name.vendor.test.ts` from #627 fails on Windows while removing its session directory (`EBUSY: resource busy or locked, rmdir`): the app-server now runs in that directory, and Windows holds it briefly after the process exits. This is on main, so it can fail the release gate. Test only: retry the removal. Passes locally on Linux; Windows is checked by this PR's CI. Not established: whether the delay is only the handle closing or something else outliving the process. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Cindy <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two Codex fixes Raft needs to move Codex onto OAR (task #166).
thread/name/set, so every start on them failed. Codex's error is now recorded as athread/name/set/errorframe with no events and the session opens. A lost connection while naming still fails.SessionOptions.cwd. It ran in the host's directory, so stdio MCP servers and a relativeCODEX_HOMEresolved there.Behaviour change: a session directory that does not exist now fails the open with
Codex session directory does not exist. Codex 0.163.0 accepted that open before. Without the new message, the spawn reports ENOENT with the executable's name.Validation: unit regressions for the recorded refusal, the lost connection, the spawn directory and the missing directory. A native vendor case on Codex 0.163.0 opens and prompts with a
CODEX_HOMErelative to the session directory. The native name refusal was not exercised, because I have no app-server without the method; the unit fixture replies-32601.pnpm run checkpassed typecheck and lint; in the full suite,tests/process-resources.test.tsfailed once under load and passed when run alone, and it does not touch this change.Source: #oar-raft:3a629875 items 3 and 7.
🤖 Generated with Claude Code