fix: ignore auto-filled streamTo for subagent spawns#64787
Conversation
Greptile SummaryThis PR changes Confidence Score: 5/5Safe to merge — the change is a scoped, correct silent-ignore over a hard-fail for an ACP-only field on subagent spawns, with no impact on the ACP path. All findings are P2 or lower. Logic is correct: streamTo was never forwarded to spawnSubagentDirect, so making the guard implicit is purely additive. The ACP path is unaffected because streamTo = runtime === 'acp' ? requestedStreamTo : undefined is always requestedStreamTo inside the ACP branch. Tests cover both the happy path and schema assertion. No files require special attention. Reviews (1): Last reviewed commit: "fix: ignore auto-filled streamTo for sub..." | Re-trigger Greptile |
17ababd to
ac52362
Compare
|
Please check |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e8e6248a44
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9d04df9b44
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c6a81402f1
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 92d811abbf
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7b729f59bb
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5bbd248cc9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ae65da170b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 78954f0ff3
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dd0fca285e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 157ebedad5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bfcd17aad4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6816c91bfd
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
this should have been an easy merge > instead you guys let me get trampled on > gg. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4b2439588e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| ? ((getLoadedChannelPluginById(providerId) as ChannelPlugin | undefined)?.mentions ?? | ||
| // Fall back to non-loaded registry reads when the loaded registry isn't initialized | ||
| // (common in isolated/unit tests and some early-runtime paths). | ||
| getChannelPlugin(providerId)?.mentions) |
There was a problem hiding this comment.
Gate bundled mention fallback on registry initialization
stripMentions now falls back to getChannelPlugin(providerId) whenever getLoadedChannelPluginById misses, but getChannelPlugin resolves loaded ?? bundled (src/channels/plugins/registry.ts), so bundled mention rules can run even when a channel plugin is not actually loaded/enabled. In runtime paths where ctx.Provider is present but absent from the active loaded registry, this rewrites user text with channel-specific strip regexes instead of leaving it unchanged, which can alter downstream command parsing; the fallback should only apply when the loaded registry is truly uninitialized.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 08e4e32932
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
08e4e32 to
fe5a4d5
Compare
|
Closing this as duplicate or superseded after Codex automated review. Close this PR as superseded by the maintainer replacement #72331. Current main still has the reported Best possible solution: Close this PR as superseded, then review and land #72331 as the canonical fix. Keep #64714 open until the replacement merges, and preserve contributor credit for this PR’s useful streamTo/schema-hint work if maintainers reuse that rationale in the replacement changelog or discussion. What I checked:
So I’m closing this here and keeping the remaining discussion on the canonical linked item. Codex Review notes: model gpt-5.5, reasoning high; reviewed against 2dba9e6a765a. |
Summary
This fixes issue #64714 by making
sessions_spawnignore an auto-filledstreamTo: "parent"when the runtime issubagent, instead of hard-failing the call.It also adds an ACP-only description to the schema field so providers that do respect field descriptions get the right guidance.
Why
Strict-mode / schema-materializing providers can emit optional fields even when the agent does not intend to use them. Because
streamTois a single-value enum, those callers can end up sending"parent"on every call, which currently makessessions_spawn(runtime="subagent")unusable.This change keeps ACP behavior intact while treating
streamToas ACP-only request data instead of unconditional caller intent.Validation
pnpm exec vitest run src/agents/tools/sessions-spawn-tool.test.tsgit diff --checkNotes
src/agents/tools/sessions-spawn-tool.tsandsrc/agents/tools/sessions-spawn-tool.test.tsonly.runtime: "subagent"plus auto-filledstreamTo: "parent".