Skip to content

feat: add native ACP subagent sessions - #419

Open
nikita-ashihmin wants to merge 6 commits into
agentclientprotocol:mainfrom
nikita-ashihmin:codex/acp-subagent-sessions
Open

feat: add native ACP subagent sessions#419
nikita-ashihmin wants to merge 6 commits into
agentclientprotocol:mainfrom
nikita-ashihmin:codex/acp-subagent-sessions

Conversation

@nikita-ashihmin

@nikita-ashihmin nikita-ashihmin commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • negotiate the ACP subagents capability
  • expose Codex collaborators as independent child session streams
  • route nested messages, tools, approvals, and elicitations to the correct child
  • emit exactly-once terminal lifecycle updates and keep the parent prompt open until announced children finish
  • preserve legacy tool-call representation for clients without the capability

Compatibility

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_complete events 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 AIR asyncTasks; support can be added when app-server exposes a real task lifecycle.

Validation

  • npm run typecheck
  • npm run build
  • npm test (447 passed, 28 skipped)

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant