fix(clients): provider subagent threads never show a composer - #13727
juliusmarminge merged 1 commit into
Conversation
| const providerSubagentNeedsResponse = | ||
| isProviderSubagent && (pendingApprovals.length > 0 || pendingUserInputs.length > 0); | ||
| const composerMounted = !showProviderSubagentBar || providerSubagentNeedsResponse; | ||
| const composerMounted = !showProviderSubagentBar; |
There was a problem hiding this comment.
🟠 High components/ChatView.tsx:4046
Provider-native child threads with persisted pending approvals or user inputs become permanently unresponsive: composerMounted is false, so ChatComposer—the only renderer for those controls—is removed and the subagent remains blocked. This affects in-flight subagents across reconnects or deployment because changing future server routing does not migrate existing pendingApprovals/pendingUserInputs; keep the response controls mounted for existing requests or render them in the provider subagent bar.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @apps/web/src/components/ChatView.tsx around line 4046:
Provider-native child threads with persisted pending approvals or user inputs become permanently unresponsive: `composerMounted` is `false`, so `ChatComposer`—the only renderer for those controls—is removed and the subagent remains blocked. This affects in-flight subagents across reconnects or deployment because changing future server routing does not migrate existing `pendingApprovals`/`pendingUserInputs`; keep the response controls mounted for existing requests or render them in the provider subagent bar.
ApprovabilityVerdict: Would Approve Macroscope's review found this PR approvable — This is a narrowly scoped cross-client UI fix that removes composer interactions from provider-owned subagent threads while preserving ordinary and T3-managed subagents. A remaining high-severity finding flags that persisted pending approvals or user inputs may lose their response controls when the composer is unmounted. Not approved because:
No code changes detected at Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
Every provider now asks a native subagent's approvals and questions on the top-level parent thread, so the web composer that #13624 kept below the subagent bar for a pending request can never mount, and hideThreadSettings has no caller left. The bar now always replaces the composer. On mobile, a message already in the outbox for a native subagent thread could still be edited, and Cancel on the edit banner discarded it because there is no composer to finish the edit in. The pending-message edit action is off for those threads. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
de6d0a2 to
685bd61
Compare
#13624 kept a composer below the provider-subagent bar for the case where a native subagent asks for an approval or an answer in its own thread. With #13726, every provider asks those on the top-level parent thread, so that path can't occur anymore. The maintainer rule is that there is no composer on a provider-native subagent thread; only T3
delegate_taskchildren keep one.Stacked on #13726.
What changed
ProviderSubagentBarnow always replaces the composer on a provider-native subagent thread.hideThreadSettingsonChatComposerhad no other caller and is removed. The same goes for thecomposerModelPickerCanStayOpenhelper it needed and that helper's test.overlayComposerIsRestingstays, because swapping in the bar still has to drop the resting reservation.ComposerQueuedEditBanner's Cancel then discarded it, because there is no composer to finish the edit in. This was the review finding on fix(clients): native subagent threads show status instead of a composer #13624.ThreadFeed'sonEditPendingMessageis now nullable, andThreadDetailScreenpassesnullon those threads, so the pencil action isn't rendered.docs/user/thread-sidebar.mdnow says the parent thread asks when such a subagent needs an approval or an answer.Verification
vp exec tsc --noEmit -p .inapps/web,apps/mobile,packages/client-runtimeandpackages/contracts: no errors or warnings.apps/serveris also clean on the base PR.vp test run src/components/composerFooterLayout.test.ts(web): 41 passed.vp linton the touched files shows 162 warnings before and after, all React-compiler warnings already on the base branch.vp run knip:checkpasses.ThreadFeedorThreadDetailScreen, and I didn't add render-to-markup tests.Model: Claude Opus 5.5 (Claude Code)
🤖 Generated with Claude Code