Repository navigation
fix(agent-status): keep nested models off parent panes - #26846
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to No actionable merge-blocking issue was established for this change. Normal test checks remain appropriate before merging. Pre-merge checks |
|
Preserve the parent's model when the existing identity fence retains an active parent for a nested CLI hook. Exercise native SessionStart and Stop bodies alongside model updates and legitimate pane takeovers. Adapted from PR #25687, with real native-hook and hidden renderer proof. Co-authored-by: Regis <92858615+Regis-RCR@users.noreply.github.com>
bf509c1 to
c8cbc4f
Compare
ELI5
When a Claude pane runs a Codex review inside it, the pane kept its Claude icon but showed Codex's model name next to it, even after the review finished. Now the pane keeps showing Claude's own model.
What Changed
Before: a Claude pane that ran
codex execdisplayed the child Codex model (for examplegpt-6-astra) beside the Claude icon, and the label stuck after the child finished.After: the pane shows the parent's own model, or no model label if the parent never reported one.
Mechanism: a nested CLI's hooks arrive on the parent's pane key. The status server already detects this case (the identity resolver reports
inheritedFromActivePaneand keeps the parent's agent type), but it still copied the child'smodelonto the parent's row. At that same point the server now drops the child's model and keeps the parent's previous model.Adapted from @Regis-RCR's #25687, which credits the earlier approach in @brennanb2025's #13602.
Why
The execution host is the single source of agent status, and it is the only place that still knows the event came from a child. Once it publishes the row relabelled as the parent, readers cannot tell the model came from the child, so a renderer-side fix is not possible. Reusing the existing identity decision keeps genuine same-agent model switches and later agent takeovers (after the parent turn is done) working unchanged.
Linked Issue
Fixes #25686
Visual Proof
Testing
server-nested-agent-model.test.tsadds six cases; four fail on current main and all pass with the fix, including a replay of real Claude/Codex hook bodies over the hook server's HTTP endpoint. All 125 agent-hooks test files pass. Typecheck, oxlint, changed-code quality andpnpm lintpass.AI Disclosure
Review
Self-review plus an independent read-only review found no P0/P1 issues.
Agent skill upstream boundary
Notes
No wire change. Remote hooks are ingested through the same server path on the execution host, so SSH panes get the same fix once the host runs this version. No platform paths or workspace-type assumptions; folder workspaces are unaffected.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)