Skip to content

fix(clients): provider subagent threads never show a composer - #13727

Merged
juliusmarminge merged 1 commit into
t3code/codex-turn-mappingfrom
v2/subagent-requests-in-parent-clients
Sep 26, 2026
Merged

juliusmarminge merged 1 commit into
t3code/codex-turn-mappingfrom
v2/subagent-requests-in-parent-clients

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

#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_task children keep one.

Stacked on #13726.

What changed

  • Web. ProviderSubagentBar now always replaces the composer on a provider-native subagent thread.
    • hideThreadSettings on ChatComposer had no other caller and is removed. The same goes for the composerModelPickerCanStayOpen helper it needed and that helper's test.
    • overlayComposerIsResting stays, because swapping in the bar still has to drop the resting reservation.
  • Mobile. A message already in the outbox for a provider-native subagent thread could still be edited. 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's onEditPendingMessage is now nullable, and ThreadDetailScreen passes null on those threads, so the pencil action isn't rendered.
    • Mobile never had a composer-below-the-bar path. Its pending approval and question cards sit above the bar and now never appear on these threads.
  • Docs. docs/user/thread-sidebar.md now says the parent thread asks when such a subagent needs an approval or an answer.

Verification

  • vp exec tsc --noEmit -p . in apps/web, apps/mobile, packages/client-runtime and packages/contracts: no errors or warnings. apps/server is also clean on the base PR.
  • vp test run src/components/composerFooterLayout.test.ts (web): 41 passed.
  • vp lint on the touched files shows 162 warnings before and after, all React-compiler warnings already on the base branch.
  • vp run knip:check passes.
  • Not run: a real-client pass on web or mobile. There are no mobile tests for ThreadFeed or ThreadDetailScreen, and I didn't add render-to-markup tests.

Model: Claude Opus 5.5 (Claude Code)

🤖 Generated with Claude Code


Devin Review

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 26, 2026
const providerSubagentNeedsResponse =
isProviderSubagent && (pendingApprovals.length > 0 || pendingUserInputs.length > 0);
const composerMounted = !showProviderSubagentBar || providerSubagentNeedsResponse;
const composerMounted = !showProviderSubagentBar;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 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.

@macroscopeapp

macroscopeapp Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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:

  • 1 blocking correctness issue found at or above your repo's Minimum Blocking Severity

No code changes detected at 685bd61. Prior analysis still applies.

Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more.

@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire — 4.9 KiB — 6.8 KiB ✅
Codex Thread snapshot wire — 3.7 KiB — 4.9 KiB ✅
Codex Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅
Codex Live turn WebSocket decoded — 20.4 KiB — 29.3 KiB ✅
Codex Live turn messages — 2 — 8 ✅
Claude Total thread wire — 4.9 KiB — 6.8 KiB ✅
Claude Thread snapshot wire — 3.7 KiB — 4.9 KiB ✅
Claude Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅
Claude Live turn WebSocket decoded — 20.8 KiB — 29.3 KiB ✅
Claude Live turn messages — 2 — 8 ✅

Baseline: unavailable · PR result: 685bd61 · Source CI: success

Scenario and decoded snapshot size

10 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.

  • Codex decoded thread snapshot: 106.1 KiB
  • Claude decoded thread snapshot: 106.4 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

Base automatically changed from v2/subagent-requests-in-parent to t3code/codex-turn-mapping September 26, 2026 00:09
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>
@juliusmarminge
juliusmarminge force-pushed the v2/subagent-requests-in-parent-clients branch from de6d0a2 to 685bd61 Compare September 26, 2026 00:11
@juliusmarminge
juliusmarminge merged commit d1f92e6 into t3code/codex-turn-mapping Sep 26, 2026
24 checks passed
@juliusmarminge
juliusmarminge deleted the v2/subagent-requests-in-parent-clients branch September 26, 2026 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant