Skip to content

fix(tab-bar): native chat tabs show their recorded provider, not one guessed from the title - #28082

Merged
brennanb2025 merged 3 commits into
mainfrom
brennan/sta-10347-bug-native-codex-chat-is-misidentified-as-hermes-when-its
Oct 13, 2026
Merged

brennanb2025 merged 3 commits into
mainfrom
brennan/sta-10347-bug-native-codex-chat-is-misidentified-as-hermes-when-its

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​72 $\color{#cf222e}{\Huge{\mathbf{−}}}$​54 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​18
Prod 6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​70 $\color{#cf222e}{\Huge{\mathbf{−}}}$​47 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​23

ELI5

A native Codex chat whose conversation name mentions another agent, for example "Hermes automation deprecation", showed that other agent's icon on its tab once a turn finished. The chat already knows which agent it is: Orca records the provider when the chat is created. The tab bar ignored that record and guessed from the conversation name instead. Now the tab uses the recorded provider, so the icon never changes with the chat's name or turn state.

What Changed

Before: a native chat tab could show Hermes, OpenCode, Grok or Claude instead of Codex whenever its conversation name mentioned that agent. While Codex was working, the live status hid the problem. Once the turn finished, or after a restore, the name took over. The drag preview and the tab's hover card showed the same wrong agent.

After: a native chat tab always shows its own provider's icon in the tab, the hover card and the drag preview, whatever the chat is called and whatever state the turn is in. Terminal tabs behave exactly as before.

Mechanism: the tab bar used to dress a native chat up as a fake terminal tab, with the conversation name as the terminal title and the provider passed as a terminal launch hint. The shared tab component then ran the terminal logic that works out which agent is in a terminal, and that logic lets a title override a finished turn. Now:

  • The shared tab component (SortableTab) no longer works out identity itself. It takes the agent as a prop.
  • Terminal tabs go through a small wrapper (TerminalSortableTab) that runs the existing terminal logic (useTabAgent) unchanged.
  • Native chat tabs pass the provider recorded on the tab (agentSessionAgent) and no longer build a fake terminal tab.
  • The right-click "Resume in New Native Chat / CLI" menu used to read the chat's provider from the fake terminal's launch hint. It now receives the chat's session id and provider together as one value (nativeChat).

Why

A chat cannot change provider, so its identity is a recorded fact and doesn't need inferring. The common pattern is to draw a conversation's icon from the provider stored on the conversation and never from its title, and this follows it. The alternative was to tighten the terminal title rules so a mention doesn't count, but that would only reduce guessing for something we already know. It would also leave chats exposed to every future change in terminal identity logic.

This PR deliberately leaves terminal identity alone. Terminal tabs can still be mislabelled when their title mentions another agent. That is a separate, known problem with its own tickets and an open PR (#26615), and it is out of scope here.

If a chat tab has no recorded provider, it now shows the generic icon instead of guessing from its name.

Linked Issue

Linear STA-10347 (also covers STA-10162, the same bug with OpenCode in the name).

Visual Proof

The same real native Codex chat, after Codex named it "Hermes Automation Deprecation Planning" and its turn finished. It was recorded in a hidden dev build, first with main's tab code and then with this branch's code. The workspace sidebar shows Codex in both.

Before (main) After (this PR)
before-hover.png after-hover.png
Tab icon Hermes; hover card says "Hermes" Tab icon Codex; hover card says "Codex"

After a full window reload, the tab still shows Codex:

after-reload-tab.png

Testing

  • New tests in TabBarItemRow.test.tsx: a Codex chat named "Hermes automation deprecation", "Claude Code review", "Review Grok usage" or "OpenCode launch-flow design" renders with codex as its agent, and passes its session id and provider to the menu. A chat with no recorded provider renders with no agent. These tests fail on main.

  • Existing tab-bar, terminal-pane resume, session-history switch and useTabAgent suites pass (82 files, 763 tests). Tests that rendered the tab component directly now pass the agent explicitly.

  • orca-ci-checks (lint, code quality, localization, typecheck) passes.

  • Live check on macOS (hidden dev build): created a real native Codex chat with the prompt "We are planning the Hermes automation deprecation", let the turn finish, and recorded the tab before and after the change and after a window reload (screenshots above). The before state matches the report: Hermes icon and hover card while the sidebar says Codex.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

Review

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

  • SSH / paired hosts: the provider comes from the tab record, which paired-host tab sync already carries (agentSessionAgent). No wire or protocol change.
  • Folder workspaces: nothing depends on the workspace being a git worktree.
  • Activity dot: unchanged. Native chats have no terminal process, so the tab's working/done dot never used the title path. It still comes from the execution host's status store.
  • Performance: terminal tabs gain one thin wrapper component. Native chat tabs no longer subscribe to the terminal identity store selectors.
  • Mobile: already drew chat icons from the recorded provider; untouched.

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)

Native Codex chat titled Hermes validation title after reload, showing Codex hover label

…guessed from the title

A native chat was rendered as a fake terminal tab, so its conversation name
went through terminal agent detection and could replace the chat's provider
once a turn finished (a Codex chat named after Hermes showed Hermes).
SortableTab now takes the agent as a prop: terminal tabs resolve it through
TerminalSortableTab (useTabAgent, unchanged), and native chat tabs pass the
provider recorded on the tab. The chat's session id and provider reach the
session-history menu together instead of riding on a terminal launch hint.

STA-10347
…-native-codex-chat-is-misidentified-as-hermes-when-its

# Conflicts:
#	src/renderer/src/components/tab-bar/tab-session-history-switch.test.ts
#	src/renderer/src/components/tab-bar/tab-session-history-switch.ts
@brennanb2025
brennanb2025 marked this pull request as ready for review October 12, 2026 23:36
@coderabbitai

coderabbitai Bot commented Oct 12, 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: 3e667a37-9090-4fff-a46b-a1988bb85513
📥 Commits

Reviewing files that changed from the base of the PR and between d8a89f1 and d621506.

📒 Files selected for processing (15)
  • src/renderer/src/components/tab-bar/SortableTab.rename-shortcut.test.tsx
  • src/renderer/src/components/tab-bar/SortableTab.tsx
  • src/renderer/src/components/tab-bar/SortableTab.update-depth-probe.test.tsx
  • src/renderer/src/components/tab-bar/SortableTabContextMenu.test.tsx
  • src/renderer/src/components/tab-bar/SortableTabContextMenu.tsx
  • src/renderer/src/components/tab-bar/TabBar.context-menu.test.ts
  • src/renderer/src/components/tab-bar/TabBarItemRow.test.tsx
  • src/renderer/src/components/tab-bar/TabBarItemRow.tsx
  • src/renderer/src/components/tab-bar/TabSessionSurfaceSwitchMenuItems.test.tsx
  • src/renderer/src/components/tab-bar/TabSessionSurfaceSwitchMenuItems.tsx
  • src/renderer/src/components/tab-bar/TerminalSortableTab.tsx
  • src/renderer/src/components/tab-bar/tab-session-history-switch.test.ts
  • src/renderer/src/components/tab-bar/tab-session-history-switch.ts
  • src/renderer/src/components/tab-bar/tab-title-tooltip.test.tsx
  • src/renderer/src/lib/use-tab-agent-observed-signal-dispatch.test.tsx

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

📝 Walkthrough

Walkthrough

SortableTab now receives its agent from the caller, and TerminalSortableTab resolves agents for terminal tabs. Agent-session items pass their recorded agent and native-chat session data. History-switch components use that session data, together with tab identity, to resolve eligible history subjects.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to d6215

No actionable issue remains from this review; the change is mergeable after normal checks.

Pre-merge checks · Passed 4 · Failed 1

Failed Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 37.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 16 functions across 15 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly and concisely identifies the main change: native chat tabs now use their recorded provider instead of inferring one from the title.
Description check Passed The description is complete and focused. It includes the user-facing behavior, implementation details, rationale, linked issue reference, visual proof, testing evidence, compatibility notes, and check…
  • 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.

…-native-codex-chat-is-misidentified-as-hermes-when-its
@brennanb2025

Copy link
Copy Markdown
Contributor Author

A native Codex chat titled with another agent's name could show that agent's tab icon and hover label after a turn finished or the window reloaded. The tab was guessing the agent from the conversation title. This PR uses the provider recorded on the chat, so its tab, hover card, and drag preview continue to show Codex regardless of the title or turn state. Terminal tabs keep their existing live agent detection.

Review found no PR-caused issue to fix or defer. The branch was synced once with current main and pushed at 6596469a053; the PR's code diff stayed identical. Local targeted tests passed (9 files, 105 tests), the full native typecheck passed, and the changed-file checks passed. On the M4Air, 64 targeted tests passed and a real Codex chat completed with the title “Hermes validation title.” The rendered tab, hover card after reload, and drag preview showed Codex; an after screenshot is attached to the PR body. I also reviewed persistence, the right-click resume menu, remote and folder workspaces, and performance paths.

CI is blocked by an unrelated main change: full lint flags HtmlDocPreview.tsx:455 for exceeding its line limit. That file is unchanged by this PR, and the same error occurred locally and in the CI job. CI stopped before its remaining checks could establish a full pass. The local CI compiler command also could not run because this machine has Bun 1.3.14 while CI configures 1.4.3; the separate native typecheck passed. The inherited lint error needs a separate fix before this PR can merge.

@brennanb2025
brennanb2025 merged commit 09ae6d2 into main Oct 13, 2026
23 of 25 checks passed
@brennanb2025
brennanb2025 deleted the brennan/sta-10347-bug-native-codex-chat-is-misidentified-as-hermes-when-its branch October 13, 2026 02:12
registered2nd pushed a commit to registered2nd/orca that referenced this pull request Oct 14, 2026
…guessed from the title (stablyai#28082)

A native chat was rendered as a fake terminal tab, so its conversation name
went through terminal agent detection and could replace the chat's provider
once a turn finished (a Codex chat named after Hermes showed Hermes).
SortableTab now takes the agent as a prop: terminal tabs resolve it through
TerminalSortableTab (useTabAgent, unchanged), and native chat tabs pass the
provider recorded on the tab. The chat's session id and provider reach the
session-history menu together instead of riding on a terminal launch hint.

STA-10347

(cherry picked from commit 09ae6d2)
brennanb2025 added a commit that referenced this pull request Oct 15, 2026
…guessed from the title (#28082)

A native chat was rendered as a fake terminal tab, so its conversation name
went through terminal agent detection and could replace the chat's provider
once a turn finished (a Codex chat named after Hermes showed Hermes).
SortableTab now takes the agent as a prop: terminal tabs resolve it through
TerminalSortableTab (useTabAgent, unchanged), and native chat tabs pass the
provider recorded on the tab. The chat's session id and provider reach the
session-history menu together instead of riding on a terminal launch hint.

STA-10347

(cherry picked from commit 09ae6d2)
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.

1 participant