Repository navigation
feat: report delegated tasks as session messages and reference children from tool calls - #760
Merged
Merged
Conversation
…en from tool calls
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.
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
session_messageviews, live and on replay, for v1 and v2.userMessageitem in a child's thread becomes the incoming view on the child. It was dropped before, and counted as a history gap on replay.spawnAgent,sendInput,sendMessage, orfollowupTaskwith a prompt becomes the outgoing view on the sender. Failed or interrupted calls report nothing.senderMessageIdandrecipientMessageIdwhen the same text is seen for the same recipient on both sides.descriptionno longer holds the task prompt. It is the thread'sagentRole, and is omitted when Codex reports none.sessioncontent for each already-announced receiver.spawnAgentstays hidden, because the announcement and the task message report the delegation.sessionCapabilities.subagentsis sent only to AIR, whose contract documents it. The RFD defines no Agent-side capability.~2.6.0, which typessessioncontent. It also addsconfigOptionsto v2session/newandsession/resume. The adapter does not advertise initial config options, so it does not apply them.docs/subagent-sessions.mdnow describes the standard contract, the AIR legacy contract, and the fallback separately. The README,readme-dev.md, anddocs/air-extensions.mdare corrected.Workarounds and limits
userMessageitem, so views are matched by recipient and equal text. If Codex rewrites the prompt on delivery, the views stay unlinked.userMessageitems have no sender field, so an unlinked incoming view carries onlyrecipientSessionId. The adapter does not assume the parent, since another session can also send input.descriptionis the raw role token, for exampledefault.Testing
npm run typecheck: clean.npm test: 159 files passed, 7 skipped. 2512 tests passed, 39 skipped.