Skip to content

fix(sessions_spawn): tolerate ACP-only fields for subagent runtime#72331

Merged
vincentkoc merged 1 commit into
mainfrom
clownfish/ghcrawl-165995-agentic-merge
Apr 27, 2026
Merged

fix(sessions_spawn): tolerate ACP-only fields for subagent runtime#72331
vincentkoc merged 1 commit into
mainfrom
clownfish/ghcrawl-165995-agentic-merge

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

Summary

  • Treat streamTo and resumeSessionId as ACP-only values that are consumed only on runtime="acp".
  • For runtime="subagent", silently ignore those ACP-only fields so strict schema-following providers cannot brick subagent spawns.
  • Add a streamTo schema description stating it requires runtime="acp" and should be omitted for subagent spawns.
  • Preserve ACP pass-through behavior and add regression tests for the subagent tolerance path.

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.ts
  • pnpm check:changed

Closes #43556. Covers #56326, #61724, #63120, #64714, and #67248 after the fix lands.

ProjectClownfish replacement details:

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation agents Agent runtime and tooling size: S maintainer Maintainer-authored PR labels Apr 26, 2026
@greptile-apps

greptile-apps Bot commented Apr 26, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR changes the sessions_spawn tool so that streamTo and resumeSessionId are treated as ACP-only fields: instead of returning a hard error when either is supplied with runtime="subagent", they are now silently dropped before the subagent spawn call. ACP pass-through is unchanged, the schema gains a description for streamTo, and docs for both fields are added to subagents.md.

  • The only open concern is that callers who pass resumeSessionId intending to resume a session but omit runtime="acp" will now silently get a fresh spawn with no indication the resume was ignored. A console.warn or a warnings key in the result would help operators detect this misconfiguration without reintroducing the blocking error.

Confidence Score: 4/5

Safe 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 AI
This 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

Comment thread src/agents/tools/sessions-spawn-tool.ts
@vincentkoc
vincentkoc force-pushed the clownfish/ghcrawl-165995-agentic-merge branch from 8ea9ed9 to 9b65803 Compare April 27, 2026 06:07
@vincentkoc
vincentkoc merged commit 1427c3a into main Apr 27, 2026
67 checks passed
@vincentkoc
vincentkoc deleted the clownfish/ghcrawl-165995-agentic-merge branch April 27, 2026 06:11
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
globalcaos pushed a commit to globalcaos/tinkerclaw that referenced this pull request May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling clawsweeper Tracked by ClawSweeper automation docs Improvements or additions to documentation maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: streamTo in sessions_spawn breaks subagent runtime

1 participant