fix: speed up Codex session forks - #10
Merged
Merged
Conversation
Upgrade the bundled Codex runtime and request metadata-only fork responses so app-server does not reconstruct the full turn history on the critical path. Regenerate protocol types and adapt to the updated stable schema. Model: GPT-5
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.
What changed
@openai/codexruntime from0.144.4to0.145.0excludeTurns: truewith nativethread/forkrequestsWhy
The first fork of a long session can be much slower than later forks because Codex app-server reconstructs the source thread's turns for the
thread/forkresponse, even though this ACP adapter does not consume those returned turns.thread/fork.excludeTurnspreserves the child thread's complete context but returns only the metadata and live fork state needed by the adapter, removing that unnecessary work from the tab-creation critical path.The experimental field is modeled explicitly at the app-server client boundary. This avoids an unsafe cast and avoids importing every unrelated experimental protocol type into the generated stable bindings.
Impact
Fork semantics do not change: the child remains a native Codex fork with full inherited context and is immediately usable for normal follow-up turns. Only unused response history reconstruction is skipped.
Validation
npm run typechecknpm test— 324 passed, 29 skippednpm run buildnpm run bundle:all— Linux x64/arm64, macOS x64/arm64, and Windows x64 passed; the final Windows arm64 target could not run because local Bun 1.3.5 reports that compile target as unsupported