feat: add native ACP subagent sessions - #419
Open
nikita-ashihmin wants to merge 10 commits into
Open
Conversation
Keep spawn and terminal lifecycle retryable when ACP delivery fails, and ensure prompt cleanup continues when the client disconnects.
Negotiate native sessions through AIR metadata while released ACP SDKs strip the draft canonical field. Normalize provider activity into child sessions, preserve nested routing, and exclude the root participant from subagent lifecycle.
Match Codex's sentence-style display names by replacing path separators within agent names and capitalizing the result.
nikita-ashihmin
force-pushed
the
codex/acp-subagent-sessions
branch
from
August 25, 2026 13:44
e0caacc to
3e33afa
Compare
Keep child turn state isolated from the root prompt and preserve pending subagent identity until activity arrives. Scope permission correlation by thread so concurrent children continue to receive approvals and elicitations.
Buffer child traffic until identity is announced, preserve immutable lifecycle generations, and replay native child history with disconnected orphan states. Keep permissions and cancellation ordered across parent and child sessions.
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.
Summary
subagentscapabilityCompatibility
The published ACP SDK does not yet contain PR #1992 types, so the change isolates the temporary structural types in
src/subagents/AcpSubagents.ts. Codex aggregate app-server notifications currently omit collaborator nickname/role; the adapter therefore uses a stable synthetic display name until that transport exposes them.Async task scope
Codex app-server V2 currently exposes no independent background-task instance lifecycle with a stable task ID, progress, and terminal state. Legacy
task_started/task_completeevents represent the foreground turn, command executions remain ACP tool calls, and scheduled-task summaries describe plugin configuration rather than running work. This PR therefore does not advertise or synthesize AIRasyncTasks; support can be added when app-server exposes a real task lifecycle.Validation
npm run typechecknpm run buildnpm test(447 passed, 28 skipped)