Skip to content

feat: report delegated tasks as session messages and reference children from tool calls - #760

Merged
benbrandt merged 1 commit into
mainfrom
feat/subagents-rfd-conformance
Nov 12, 2026
Merged

benbrandt merged 1 commit into
mainfrom
feat/subagents-rfd-conformance

Conversation

@benbrandt

Copy link
Copy Markdown
Member

Brings the standard subagent contract in line with the ACP Subagent Sessions RFD, which is moving to Preview in agentclientprotocol/agent-client-protocol#2800. The AIR legacy contract is unchanged, and its fixtures are untouched.

Changes

  • Delegated tasks are session_message views, live and on replay, for v1 and v2.
    • A userMessage item in a child's thread becomes the incoming view on the child. It was dropped before, and counted as a history gap on replay.
    • A completed spawnAgent, sendInput, sendMessage, or followupTask with a prompt becomes the outgoing view on the sender. Failed or interrupted calls report nothing.
    • The two views are linked with senderMessageId and recipientMessageId when the same text is seen for the same recipient on both sides.
  • description no longer holds the task prompt. It is the thread's agentRole, and is omitted when Codex reports none.
  • Collaboration tool calls carry session content for each already-announced receiver. spawnAgent stays hidden, because the announcement and the task message report the delegation.
  • No Agent-side capability for standard Clients. sessionCapabilities.subagents is sent only to AIR, whose contract documents it. The RFD defines no Agent-side capability.
  • SDK ~2.6.0, which types session content. It also adds configOptions to v2 session/new and session/resume. The adapter does not advertise initial config options, so it does not apply them.
  • Docs. docs/subagent-sessions.md now describes the standard contract, the AIR legacy contract, and the fallback separately. The README, readme-dev.md, and docs/air-extensions.md are corrected.

Workarounds and limits

  • Linking by text. Codex exposes no ID shared by the sender's collab item and the receiver's userMessage item, so views are matched by recipient and equal text. If Codex rewrites the prompt on delivery, the views stay unlinked.
  • Sender-less incoming views. userMessage items have no sender field, so an unlinked incoming view carries only recipientSessionId. The adapter does not assume the parent, since another session can also send input.
  • description is the raw role token, for example default.
  • The unlinked-view lists are not pruned during a session.

Testing

  • npm run typecheck: clean.
  • npm test: 159 files passed, 7 skipped. 2512 tests passed, 39 skipped.
  • New live and replay delegation snapshots for v1 and v2. Not run against real Codex.

@benbrandt
benbrandt merged commit 6567651 into main Nov 12, 2026
6 checks passed
@benbrandt
benbrandt deleted the feat/subagents-rfd-conformance branch November 12, 2026 15:42
EugeneTheDev pushed a commit that referenced this pull request Nov 16, 2026
🤖 I have created a release *beep* *boop*
---


##
[2.7.0](v2.6.0...v2.7.0)
(2026-11-16)


### Features

* report delegated tasks as session messages and reference children from
tool calls
([#760](#760))
([6567651](6567651))
* send structured plans as items plan_update when the client supports it
([#752](#752))
([ab7a968](ab7a968))
* show the retry cause as details of the AIR retry warning
([#755](#755))
([e981b3c](e981b3c))


### Bug Fixes

* Map priority mode to fast
([#327](#327))
([52cc518](52cc518))
* report hooks that block or stop Codex
([#767](#767))
([bcf0e92](bcf0e92))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: acp-release-bot[bot] <246668977+acp-release-bot[bot]@users.noreply.github.com>
mrmans0n added a commit to mrmans0n/codex-acp that referenced this pull request Nov 17, 2026
Upstream v2.7.0 (agentclientprotocol#760) stops advertising sessionCapabilities.subagents to
standard clients: the scenario baseline now strips it from each recorded
initialize response, and CodexAcpServer imports SessionFailureIds (agentclientprotocol#767) on the
import line next to the patch's SessionInstructions import. The adaptation keeps
upstream's subagents removal next to the patch's _meta.systemPrompt capability
in the baseline and both notes in its comment. The sorted added and removed
lines are identical to 57fdf79 (originally
febcd2b); upstream v2.7.0 does not change the systemPrompt conversion that the
_meta.systemPrompt.append alias feeds.
mrmans0n added a commit to mrmans0n/codex-acp that referenced this pull request Nov 17, 2026
Upstream v2.7.0 (agentclientprotocol#760) adds an initialize test (sessionCapabilities.subagents
only for AIR) at the position of the hook review initialize tests. Both are
kept; the sorted added and removed lines are identical to
2662df6 (originally 2341b05). Upstream's
agentclientprotocol#767 reports hook runs that block or stop Codex from hook/completed
notifications, independently of the hook list and trust review, which v2.7.0
does not touch.
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