From e025dfd9ea485beb477849daa71c2f33e6ee29e9 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Sun, 23 Aug 2026 18:36:15 -0700 Subject: [PATCH] fix(agent-status): require spinner for working labels --- src/shared/agent-title-evidence.test.ts | 13 ++++++++++++- src/shared/agent-title-evidence.ts | 6 +++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/shared/agent-title-evidence.test.ts b/src/shared/agent-title-evidence.test.ts index e01778da781..c6032f974ef 100644 --- a/src/shared/agent-title-evidence.test.ts +++ b/src/shared/agent-title-evidence.test.ts @@ -195,6 +195,14 @@ describe('collectAgentTitleEvidence', () => { expect(reasonFor(title)).toBe('anchored') }) + it.each(['Droid', 'Hermes', 'Devin'])( + 'does not treat a bare working label as synthetic identity: %s', + (title) => { + expect(agentFor(title)).toBeNull() + expect(reasonFor(title)).toBe('free-text-only') + } + ) + it.each([ 'Claude Code ready', 'Claude thinking', @@ -221,7 +229,10 @@ describe('collectAgentTitleEvidence', () => { it.each([ ['⠋ Cursor Agent', 'cursor'], ['⠋ Pi idle', 'pi'], - ['⠋ OMP done', 'omp'] + ['⠋ OMP done', 'omp'], + ['⠋ Droid', 'droid'], + ['⠋ Hermes', 'hermes'], + ['⠋ Devin', 'devin'] ] as const)('recognizes the decorated identity frame %s', (title, agent) => { expect(agentFor(title)).toBe(agent) expect(reasonFor(title)).toBe('anchored') diff --git a/src/shared/agent-title-evidence.ts b/src/shared/agent-title-evidence.ts index c454865b6fb..85790cbc52c 100644 --- a/src/shared/agent-title-evidence.ts +++ b/src/shared/agent-title-evidence.ts @@ -7,6 +7,7 @@ import { GEMINI_SILENT_WORKING, GEMINI_WORKING, HERMES_AGENT_NAME_RE, + containsAgentSpinnerGlyph, isClaudeIdentityFrameSegment, isClaudeManagementTitle, isCursorNativeAgentTitle, @@ -196,7 +197,10 @@ function agentForSyntheticTitle(text: string): TuiAgent | null { const profile = SYNTHETIC_AGENT_TITLE_PROFILES[agent] const emittedLabels = [profile.permissionLabel, profile.idleLabel] if (profile.synthesizeWorkingTitle !== false) { - emittedLabels.push(profile.workingLabel) + // Working labels are emitted only as spinner frames; a bare name is free text. + if (containsAgentSpinnerGlyph(trimmed) && normalized === profile.workingLabel.toLowerCase()) { + return agent + } } if ( profile.synthesizeTerminalTitle !== false &&