fix(core): identify spawned subagents (#38189)

This commit is contained in:
Dax 2026-07-21 16:54:01 -04:00 committed by GitHub
commit 1ea9137c01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View file

@ -273,6 +273,9 @@ describe("SubagentTool", () => {
agent: "reviewer",
model: childModel,
})
expect((yield* sessions.pending(child.id)).find((message) => message.type === "user")?.data.text).toBe(
"You are a subagent spawned by another session.\nreview this",
)
const fallback = yield* settleTool(registry, {
sessionID: parent.id,