Skip to content

fix(mobile): keep a finished agent tab's icon when its name mentions another agent - #40513

Merged
AmoabaKelvin merged 2 commits into
mainfrom
fix/mobile-tab-name-not-agent-title
Nov 9, 2026
Merged

AmoabaKelvin merged 2 commits into
mainfrom
fix/mobile-tab-name-not-agent-title

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

ELI5

On the phone, a finished Claude tab could show the Antigravity icon just because its name started with "Agy". The phone was reading the tab's name as if Claude had typed it into the terminal title. Now a tab's name no longer counts as a clue to which agent is running.

Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​20 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​20
Prod 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​44 $\color{#cf222e}{\Huge{\mathbf{−}}}$​4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​40

What Changed

Before: a Claude terminal tab named "Agy status bar item" (Claude's own session name) showed the Antigravity icon on mobile once its turn finished. Desktop showed Claude.

After: the tab keeps the Claude icon on mobile. When the published title is the tab's name (a custom name, quick-command label, Claude/Codex session name, or generated name), mobile stops passing it to the shared tab-agent resolver as title evidence. Real terminal titles still count, as they do on desktop.

How it works:

  • Hosts send mobile the tab's resolved name in title, plus the name fields it was resolved from (customTitle, quickCommandLabel, aiVaultTitle, generatedTitle).
  • The phone now picks those fields up. It re-ranks them with the shared resolveTabNameSource, the same order the host used. If the published title is that name, it isn't the agent's own title, so it isn't passed in as evidence.
  • The phone's tab-equality gate now compares those name fields, so a name-only change re-renders the tab.

Why

Supersedes #40085. Thanks @Manho for the report and the analysis that pinned it to resolveMobileTerminalTabAgentId.

Root cause: desktop resolves the icon from the raw terminal title, ✳ Agy status bar item. The ✳ prefix marks it as Claude's, so the "Agy" in the task text is ignored. Mobile never gets that raw title. It gets the session name Agy status bar item with no prefix, and it fed that name to the same resolver. The resolver's "a title naming a different agent means the pane was reused" rule then outranked the finished Claude hook.

#40085 instead made a finished hook that matches the launch agent outrank the title. That fixes this report, but it also stops mobile from spotting an agent started by hand in that pane by its real terminal title, which desktop still does. It also doesn't help a finished tab with no launch identity. This change removes the wrong input instead, so mobile and desktop read the same evidence.

Linked Issue

Fixes #40084

Visual Proof

The real MobileSessionTabStrip rendered through the mobile web bundle, fed the tab the host publishes: a finished Claude tab whose session name is "Agy status bar item", next to a working Claude tab.

Before After
before.png after.png

Testing

  • I manually tested these changes locally

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

  • Every added test fails without this change and avoids the test anti-patterns

  • Added mobile-terminal-tab-agent.test.ts: a finished Claude tab whose session name is "Agy status bar item" resolves to claude. It fails without the fix (expected 'antigravity' to be 'claude').

  • Ran the real headless host projection (buildHeadlessMobileSessionTerminalTabs) on a tab with live title ✳ Agy status bar item and that session name. It publishes title: "Agy status bar item" plus aiVaultTitle, and the phone now resolves claude. A raw reuse title (agy) on the same finished Claude tab still resolves to antigravity, and a tab with no launch identity still falls back to its title.

  • Before/after screenshots of the real tab strip above. pnpm check:changed, mobile tsc --noEmit and the mobile terminal/session and session/tabs tests pass.

Risk

Mobile only, no protocol or saved-data change. Hosts already send the name fields. Older hosts that omit them keep today's behaviour.

Riskiest part: a named tab no longer uses its title to spot an agent started by hand. That title was the name, not the agent's title, so it was never real evidence. Such a tab shows the previous agent until the new agent's hook arrives.

Back out with a plain revert.

Level: Low

AI Disclosure

Review

Follow-ups, not in this PR:

  • Orca's own generated tab names (setting off by default) don't reach the phone from a desktop host, so those still go through the title path.
  • A desktop paired to another host mirrors the host's tab name as title too, so its icon has the same misread.

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

Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

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)
  • I stated the risk: what could break, for whom, and how to back it out
  • 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)

AmoabaKelvin and others added 2 commits November 9, 2026 22:42
The host publishes a terminal tab's name (custom name, quick-command
label or agent session name) in place of its live title. Mobile fed
that name to the shared tab-agent resolver as title evidence, so a
finished Claude tab named "Agy status bar item" was read as a reused
Antigravity pane. Desktop resolves from the raw title and shows Claude.

Fixes #40084

Co-authored-by: Wenhao <[email protected]>
@AmoabaKelvin
AmoabaKelvin merged commit 2783f8e into main Nov 9, 2026
24 of 25 checks passed
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.

[Bug]: Mobile shows the Antigravity icon on a completed Claude tab whose title mentions "Agy"

1 participant