Repository navigation
fix(agent-title): treat Claude Code quarter-circle spinners as working (#13889) - #13925
brennanb2025 merged 2 commits into
Conversation
Claude Code 2.1.228 swapped its busy OSC title spinner from braille
(U+2800-U+28FF) to quarter circles (U+25D0/U+25D1). Orca recognized a busy
Claude title only by braille codepoints, so the new frames matched nothing.
The summary-bearing busy frame ("<glyph> Say hi in one word") carries no
"claude" name token, so it resolved to no-status. The tracker's "idle or
permission followed by no-status means the agent exited" rule then fired
mid-turn, confirmPtyAgentExit confirmed it, and the chat surface routed
exitChat -- kicking the tab to the terminal view on every message.
Widen the accepted glyph set via a shared containsAgentSpinnerGlyph helper.
Agent-specific braille frame shapes (Grok, Pi, synthetic Cursor) stay pinned
to their own glyph set.
Fixes #13889
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThe change adds quarter-circle spinner detection and combines it with existing Braille detection. Claude title identity, status, terminal-agent classification, worktree attribution, decorative normalization, and working-indicator cleanup now use the broader spinner handling. New regression tests cover captured Claude busy-title sequences, tracker events, stale-title cleanup, decorative transitions, Braille parity, and Gemini idle-glyph behavior. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: bff95a72-ffba-4981-b368-84f512b99e02
📒 Files selected for processing (9)
src/renderer/src/lib/worktree-status.tssrc/shared/agent-decorative-title-signature.tssrc/shared/agent-title-core.tssrc/shared/agent-title-decoration.tssrc/shared/agent-title-identity.tssrc/shared/agent-title-status.tssrc/shared/repro-13889-claude-quarter-circle-busy-title.test.tssrc/shared/terminal-output-side-effects.tssrc/shared/terminal-title-agent-type.ts
| // eslint-disable-next-line no-control-regex -- intentional unicode range | ||
| export const QUARTER_CIRCLE_SPINNER_RE = /[\u25d0-\u25d3]/g |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Remove the unused no-control-regex suppressions.
oxlint reports both directives as unused because the regular expressions contain no control characters.
src/shared/agent-title-core.ts#L53-L54: remove theno-control-regexdirective beforeQUARTER_CIRCLE_SPINNER_RE.src/shared/terminal-output-side-effects.ts#L32-L33: remove theno-control-regexdirective beforeSPINNER_FRAME_GLYPH_RE.
🧰 Tools
🪛 GitHub Check: static analysis
[failure] 53-53: oxlint
Unused eslint-disable directive (no problems were reported).
📍 Affects 2 files
src/shared/agent-title-core.ts#L53-L54(this comment)src/shared/terminal-output-side-effects.ts#L32-L33
Source: Linters/SAST tools
| it('does not claim Gemini’s ◇ idle glyph, which neighbors the spinner block', () => { | ||
| expect(detectAgentStatusFromTitle('◇ Gemini CLI')).toBe('idle') | ||
| expect(getAgentLabel('◇ Gemini CLI')).toBe('Gemini CLI') | ||
| }) |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Assert that ◇ is outside the Claude spinner range.
detectAgentStatusFromTitle and getAgentLabel handle Gemini titles before the generic spinner predicate. The current assertions can therefore pass if containsAgentSpinnerGlyph incorrectly includes ◇. Add an isClaudeAgent assertion to exercise the generic identity path.
Proposed test addition
it('does not claim Gemini’s ◇ idle glyph, which neighbors the spinner block', () => {
+ expect(isClaudeAgent('◇ Gemini CLI')).toBe(false)
expect(detectAgentStatusFromTitle('◇ Gemini CLI')).toBe('idle')📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| it('does not claim Gemini’s ◇ idle glyph, which neighbors the spinner block', () => { | |
| expect(detectAgentStatusFromTitle('◇ Gemini CLI')).toBe('idle') | |
| expect(getAgentLabel('◇ Gemini CLI')).toBe('Gemini CLI') | |
| }) | |
| it('does not claim Gemini’s ◇ idle glyph, which neighbors the spinner block', () => { | |
| expect(isClaudeAgent('◇ Gemini CLI')).toBe(false) | |
| expect(detectAgentStatusFromTitle('◇ Gemini CLI')).toBe('idle') | |
| expect(getAgentLabel('◇ Gemini CLI')).toBe('Gemini CLI') | |
| }) |
| // Braille spinner glyphs (U+2800–U+28FF); mirrors the range clearWorkingIndicators strips in agent-detection.ts. | ||
| // eslint-disable-next-line no-control-regex -- intentional unicode range | ||
| const BRAILLE_SPINNER_RE = /[\u2800-\u28FF]/g | ||
| // Braille and quarter-circle spinner glyphs; mirrors the ranges clearWorkingIndicators strips in agent-detection.ts. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Update the stale source-file reference.
clearWorkingIndicators is defined in src/shared/agent-title-status.ts in this cohort. The comment points to agent-detection.ts. Use the current path so future spinner-range changes target the correct file.
Proposed fix
-// Braille and quarter-circle spinner glyphs; mirrors the ranges clearWorkingIndicators strips in agent-detection.ts.
+// Braille and quarter-circle spinner glyphs; mirrors the ranges clearWorkingIndicators strips in agent-title-status.ts.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // Braille and quarter-circle spinner glyphs; mirrors the ranges clearWorkingIndicators strips in agent-detection.ts. | |
| // Braille and quarter-circle spinner glyphs; mirrors the ranges clearWorkingIndicators strips in agent-title-status.ts. |
Electron UI validation (#13889 / PR #13925)Commit: Identity check (
MethodLive in-app repro (no title-sequence fixture gap for the busy path):
Also: unit suite Visible outcome
Polled LogsRenderer/app log (
ScreenshotsClaude 2.1.228 idle (TUI) before chat toggle: During quarter-circle busy (chat UI + composer still present; agent working): After idle in chat (reply “Hi”; still chat, not terminal): Gaps
Verdict: PASS — quarter-circle busy titles classified as working; experimental Chat UI does not fall back to terminal view on send. |
…14092) * fix(terminal): require agent identity for guarded sends (STA-4028) Quarter-circle spinner glyphs (U+25D0-U+25D3) started classifying a title as "working" in #13925, and that status alone authorized guarded agent sends — which auto-submit with Enter — into any pane whose TUI animates those generic progress frames. Keep the glyphs as an activity signal, but stop treating a title whose only agent evidence is a quarter circle as proof an agent owns the pane: send authorization now falls through to recognized-agent identity in the title or a recognized foreground process. Braille-spinner behavior is unchanged. * fix(terminal): preserve verified managed busy identity * fix(terminal): bind busy identity to process incarnation * chore(test): avoid duplicate terminal gate suite
…14092) * fix(terminal): require agent identity for guarded sends (STA-4028) Quarter-circle spinner glyphs (U+25D0-U+25D3) started classifying a title as "working" in #13925, and that status alone authorized guarded agent sends — which auto-submit with Enter — into any pane whose TUI animates those generic progress frames. Keep the glyphs as an activity signal, but stop treating a title whose only agent evidence is a quarter circle as proof an agent owns the pane: send authorization now falls through to recognized-agent identity in the title or a recognized foreground process. Braille-spinner behavior is unchanged. * fix(terminal): preserve verified managed busy identity * fix(terminal): bind busy identity to process incarnation * chore(test): avoid duplicate terminal gate suite (cherry picked from commit cb41f3c)
stablyai#13889) (stablyai#13925) * fix(agent-title): treat Claude Code quarter-circle spinners as working Claude Code 2.1.228 swapped its busy OSC title spinner from braille (U+2800-U+28FF) to quarter circles (U+25D0/U+25D1). Orca recognized a busy Claude title only by braille codepoints, so the new frames matched nothing. The summary-bearing busy frame ("<glyph> Say hi in one word") carries no "claude" name token, so it resolved to no-status. The tracker's "idle or permission followed by no-status means the agent exited" rule then fired mid-turn, confirmPtyAgentExit confirmed it, and the chat surface routed exitChat -- kicking the tab to the terminal view on every message. Widen the accepted glyph set via a shared containsAgentSpinnerGlyph helper. Agent-specific braille frame shapes (Grok, Pi, synthetic Cursor) stay pinned to their own glyph set. Fixes stablyai#13889 * fix(agent-title): satisfy static analysis and trim scope (cherry picked from commit 137e724)
…tablyai#14092) * fix(terminal): require agent identity for guarded sends (STA-4028) Quarter-circle spinner glyphs (U+25D0-U+25D3) started classifying a title as "working" in stablyai#13925, and that status alone authorized guarded agent sends — which auto-submit with Enter — into any pane whose TUI animates those generic progress frames. Keep the glyphs as an activity signal, but stop treating a title whose only agent evidence is a quarter circle as proof an agent owns the pane: send authorization now falls through to recognized-agent identity in the title or a recognized foreground process. Braille-spinner behavior is unchanged. * fix(terminal): preserve verified managed busy identity * fix(terminal): bind busy identity to process incarnation * chore(test): avoid duplicate terminal gate suite (cherry picked from commit cb41f3c)
…tablyai#14092) * fix(terminal): require agent identity for guarded sends (STA-4028) Quarter-circle spinner glyphs (U+25D0-U+25D3) started classifying a title as "working" in stablyai#13925, and that status alone authorized guarded agent sends — which auto-submit with Enter — into any pane whose TUI animates those generic progress frames. Keep the glyphs as an activity signal, but stop treating a title whose only agent evidence is a quarter circle as proof an agent owns the pane: send authorization now falls through to recognized-agent identity in the title or a recognized foreground process. Braille-spinner behavior is unchanged. * fix(terminal): preserve verified managed busy identity * fix(terminal): bind busy identity to process incarnation * chore(test): avoid duplicate terminal gate suite (cherry picked from commit cb41f3c)
stablyai#13889) (stablyai#13925) * fix(agent-title): treat Claude Code quarter-circle spinners as working Claude Code 2.1.228 swapped its busy OSC title spinner from braille (U+2800-U+28FF) to quarter circles (U+25D0/U+25D1). Orca recognized a busy Claude title only by braille codepoints, so the new frames matched nothing. The summary-bearing busy frame ("<glyph> Say hi in one word") carries no "claude" name token, so it resolved to no-status. The tracker's "idle or permission followed by no-status means the agent exited" rule then fired mid-turn, confirmPtyAgentExit confirmed it, and the chat surface routed exitChat -- kicking the tab to the terminal view on every message. Widen the accepted glyph set via a shared containsAgentSpinnerGlyph helper. Agent-specific braille frame shapes (Grok, Pi, synthetic Cursor) stay pinned to their own glyph set. Fixes stablyai#13889 * fix(agent-title): satisfy static analysis and trim scope
…tablyai#14092) * fix(terminal): require agent identity for guarded sends (STA-4028) Quarter-circle spinner glyphs (U+25D0-U+25D3) started classifying a title as "working" in stablyai#13925, and that status alone authorized guarded agent sends — which auto-submit with Enter — into any pane whose TUI animates those generic progress frames. Keep the glyphs as an activity signal, but stop treating a title whose only agent evidence is a quarter circle as proof an agent owns the pane: send authorization now falls through to recognized-agent identity in the title or a recognized foreground process. Braille-spinner behavior is unchanged. * fix(terminal): preserve verified managed busy identity * fix(terminal): bind busy identity to process incarnation * chore(test): avoid duplicate terminal gate suite





ELI5
Claude Code shows a little spinner in the terminal's title while it's thinking. In 2.1.228 it changed that spinner from braille dots (
⠂) to quarter circles (◐). Orca only knew about the braille dots, so the moment Claude started working, Orca thought "there's no agent here anymore — it must have quit" and dumped you out of the Chat UI back to the raw terminal. This teaches Orca the new spinner shapes.What Changed
detectAgentStatusFromTitleand the Claude identity checks now accept quarter-circle spinner glyphs (U+25D0–U+25D3) alongside braille, via a new sharedcontainsAgentSpinnerGlyphhelper inagent-title-core.ts.Applied at every site that treats "title has a spinner" as generic agent activity — 7 in total, not the 3 the issue suggested:
agent-title-status.tsdetectAgentStatusFromTitle→working;clearWorkingIndicatorsstrips the new glyphagent-title-identity.tsisClaudeAgent— busy pane keeps its "Claude Code" identityterminal-title-agent-type.tsisClaudeAgent+hasGenericClaudeStatusPrefix(6 importers)agent-decorative-title-signature.ts◐→◑tick reads as a real title change and churns tab/sort stateagent-title-decoration.tsworktree-status.tsAgent-specific braille frame shapes (Grok rotating frames, Pi, synthetic Cursor titles) are deliberately left braille-only — those are other agents' or Orca's own formats.
Why
Claude Code 2.1.228 (2026-08-11) changed its busy title spinner. I captured OSC titles from both real binaries running the same one-line prompt:
✳ Claude Code⠂/⠐ Claude Code(U+2802 / U+2810)✳ Claude Code◐/◑ Claude Code(U+25D0 / U+25D1)Note: the issue's stated mechanism is slightly off, and it matters for the fix. #13889 says
◐ Claude Codereturnsnull. It doesn't — that title still containsclaudeas a whole token, so it falls through to the name-based tail and returns'idle'(wrong status, but no exit). The exit actually fires on the summary-bearing frame, which has no agent-name token:→
confirmPtyAgentExit→resolveNativeChatLeafRoutereturnsexitChat→setTabViewMode(tabId, 'terminal').Claude switches to the task-summary title within the first turn, which is why the symptom hits every message including the first, exactly as reported. The one-line test the issue suggests (
detectAgentStatusFromTitle('◐ Claude Code')) would have passed against'idle'and missed the actual exit path.I also placed the identity check inside
isClaudeAgentrather than the top-level prefix block the issue suggested — that block runs before the Codex/Grok/Cursor name checks, so◐ Grokwould have been mislabeled "Claude Code".This will hit every Orca + Claude Code user as the 2.1.228 autoupdate rolls out.
Linked Issue
Fixes #13889
Visual Proof
No before/after recording — flagging honestly rather than writing N/A, since there is a real interaction change. Capturing it requires installing 2.1.228 as the machine's global
claude, which I didn't want to do unprompted. Happy to record one if a reviewer wants it before merge.The behavior change is pinned deterministically instead. Replaying the captured 2.1.228 title sequence through
createAgentStatusTracker:Per-title, before → after:
◐ Claude Codeidle→workingnull→Claude Codefalse→true◐ Say hi in one wordnull→workingnull→Claude Codefalse→true⠂ Say hi in one word(2.1.227)working(unchanged)Claude Code(unchanged)true(unchanged)How to test
Repro without installing anything globally — download the binary to a temp dir and PTY-capture its titles:
Note that grepping the binary for a spinner array does not work — the npm package is a 24KB thin installer and the real 290MB binary has a compressed JS payload. A null grep result is meaningless (2.1.227 shows no braille array either), and random machine-code bytes decode as
◐, giving convincing false hits. PTY capture is the only reliable oracle.In-app: install Claude Code 2.1.228, enable the experimental Chat UI, open a Claude session in chat view, send any message. Before this change the tab flips to terminal view as Claude starts working; after, it stays in chat.
Automated:
Platforms: logic is pure string/codepoint matching over OSC titles with no platform branches, so it behaves identically on macOS/Linux/Windows and over SSH. Verified on macOS.
src/shared/repro-13889-claude-quarter-circle-busy-title.test.tsreplays the captured turn and asserts parity with 2.1.227 frame-for-frame. Verified non-vacuous: with the source fix stashed, 8 of 9 assertions fail, includingexpected [ 'exited' ] to not include 'exited'. (The 9th is a boundary guard that Gemini's◇U+25C7 idle glyph — which neighbors the spinner block — is not swallowed; it correctly passes both ways.)AI Disclosure
Internal contribution. Investigated and implemented with Claude Opus 5.
Review
✳/./*handling is untouched, so 2.1.227 and earlier behave exactly as before (asserted frame-for-frame in the tests).◒/◓frames later won't regress this. The deeper fragility the issue calls out — any unrecognized glyph after an idle title reads as an exit — is not addressed here and is worth a separate issue.Checklist
N/Awith reason — see Visual Proof; deliberately not claimedpnpm lint,pnpm typecheckpass locally; targetedvitestsuites pass — see belowRan locally:
pnpm lint(clean),pnpm typecheck:tsc(clean),oxfmt --check(clean), and vitest oversrc/shared,src/renderer,src/main,src/renderer/src/store— 8310 passed in the changed surface, no regressions.pnpm buildnot run locally; leaving that to CI.Local-only red, not caused by this PR:
src/main/ipc/pty.test.tsfails 10 tests locally (MiMo/Pi/OMP overlay env). It fails identically on a clean tree atorigin/main(444638d) with this change stashed, so it is not from this branch. Most likely a local-environment artifact — my node is v26.5.0 while the repo pins node 24 — rather than a real break on main; CI's node 24 / node 26 shards are the authority. Nothing in this change touches PTY spawn env.