Skip to content

fix(agent-status): keep nested models off parent panes - #26846

Merged
OrcaWin merged 3 commits into
mainfrom
nwparker/obvious-parent-model-10-09
Oct 11, 2026
Merged

OrcaWin merged 3 commits into
mainfrom
nwparker/obvious-parent-model-10-09

Conversation

@nwparker

@nwparker nwparker commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​192 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​192
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​13 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​11

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 exec displayed the child Codex model (for example gpt-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 inheritedFromActivePane and keeps the parent's agent type), but it still copied the child's model onto 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

Before: Claude row retains the nested Codex model

After: Claude row has no leaked child model

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

server-nested-agent-model.test.ts adds 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 and pnpm lint pass.

AI Disclosure

Review

Self-review plus an independent read-only review found no P0/P1 issues.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

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

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@nwparker
nwparker marked this pull request as ready for review October 9, 2026 11:19
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b477547b-11d2-48f7-9c74-fe5a294f46d7


📥 Commits

Reviewing files that changed from the base of the PR and between bf509c1 and c8cbc4f.



📒 Files selected for processing (1)
  • src/main/agent-hooks/server-nested-agent-model.test.ts


Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.




📝 Walkthrough
📝 Walkthrough

Walkthrough

When a nested hook inherits the active pane’s identity, the status update removes the nested model and retains the previous row’s model when available. Tests cover status snapshots and HTTP-hook status and events, including cases where the parent model is present or absent.



Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to c8cbc

No actionable merge-blocking issue was established for this change. Normal test checks remain appropriate before merging.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed Issue #25686 requires the parent Claude model to remain on the sidebar card and dashboard row after nested codex exec events. applyNormalizedStatus now removes an inherited child model and retains…
Out of Scope Changes check Passed The changes are limited to the existing agent status normalization path and focused regression tests. The implementation and tests directly support issue #25686. No unrelated files or behavior are ide…
Title check Passed The title clearly identifies the main change: preventing nested agent models from appearing on parent panes.
Description check Passed The description is complete and follows the repository template. It explains the user impact, implementation, rationale, linked issue, visual proof, testing, compatibility considerations, and checklis…

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR



  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

nwparker added a commit that referenced this pull request Oct 9, 2026
Records the retained adapted contribution from #13602 in replacement PR #26846.

Co-authored-by: Brennan Benson <79079362+brennanb2025@users.noreply.github.com>
nwparker and others added 3 commits October 10, 2026 22:27
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>
Records the retained adapted contribution from #13602 in replacement PR #26846.

Co-authored-by: Brennan Benson <79079362+brennanb2025@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Claude Code session shows the Codex model after running codex exec in its pane

2 participants