feat: support ACP session fork - #9
Merged
Merged
Conversation
Map ACP session/fork directly to Codex thread/fork, advertise the capability, and install forked threads through the shared session lifecycle. Model: GPT-5
Prepare the native ACP session fork release. 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
sessionCapabilities.forkduring ACP initializationsession/forkand map it directly to Codex App Serverthread/forkcwd, MCP servers, and additional directories into the forked Codex threadWhy
Codex App Server already supports
thread/fork, but the ACP adapter did not expose that primitive. ACP clients therefore could not discover or invoke native Codex session forking.This keeps fork as a lifecycle operation and does not emulate it by replaying history.
Refs agentclientprotocol#315.
Impact
ACP clients can capability-gate a fork action, create an independent child session, and continue prompting it using the existing prompt/resume/load/close/delete paths. The source session remains unchanged.
Validation
npm run typechecknpm test— 324 passed, 29 skippednpm run buildnpm pack --dry-runnpx -p bun@1.3.11 npm run bundle:all— all six CI targets passedCODEX_API_KEYnorOPENAI_API_KEY