fix(sessions_spawn): tolerate ACP-only fields for subagent runtime#72331
Conversation
Greptile SummaryThis PR changes the
Confidence Score: 4/5Safe to merge; the only finding is a non-blocking observability gap in the silent-drop path. All findings are P2. The implementation correctly strips ACP-only fields from the subagent path and preserves ACP passthrough. Tests cover the new tolerant behaviour and the schema description assertion. src/agents/tools/sessions-spawn-tool.ts — consider adding a warning when ACP-only fields are dropped for non-ACP runtime. Prompt To Fix All With AIThis is a comment left during a code review.
Path: src/agents/tools/sessions-spawn-tool.ts
Line: 267
Comment:
**No diagnostic when ACP-only fields are silently dropped**
When a caller supplies `resumeSessionId` or `streamTo` but `runtime` defaults to `"subagent"`, both fields are now silently discarded rather than producing an error. A caller that intends to resume an existing session (`resumeSessionId: "<uuid>"`) will instead get a fresh spawn with no indication that the resume request was ignored. Adding at least a `console.warn` (or including a `warnings` key in the result payload) when either field is present but runtime is not `"acp"` would help operators diagnose misconfiguration without reintroducing the blocking error behaviour.
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "fix(sessions_spawn): tolerate ACP-only f..." | Re-trigger Greptile |
7266af9 to
8ea9ed9
Compare
8ea9ed9 to
9b65803
Compare
Summary
streamToandresumeSessionIdas ACP-only values that are consumed only onruntime="acp".runtime="subagent", silently ignore those ACP-only fields so strict schema-following providers cannot brick subagent spawns.streamToschema description stating it requiresruntime="acp"and should be omitted for subagent spawns.Credit
This carries forward the focused implementation work from skernelx in #68397 and damselem in #65282, plus the schema-hint work from vvitovec in #69170 and Sanjays2402 in #69203.
Validation
pnpm -s vitest run src/agents/tools/sessions-spawn-tool.test.tspnpm check:changedCloses #43556. Covers #56326, #61724, #63120, #64714, and #67248 after the fix lands.
ProjectClownfish replacement details: