Skip to content

fix(indicator): a short-lived Claude no longer leaves its tab marked (core 0.41.6) - #243

Merged
Maxaubert merged 2 commits into
mainfrom
fix/title-agent-recheck
Oct 16, 2026
Merged

Maxaubert merged 2 commits into
mainfrom
fix/title-agent-recheck

Conversation

@Maxaubert

@Maxaubert Maxaubert commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Prism's full e2e failed "claude leaving clears the detection" three times today (core 0.41.2 and 0.41.5), passing alone. Reported by the Prism session.

Cause (a regression from #238)

  • A tab's agent mark goes up on Claude's title alone; only the process poll takes it back, and the poll sends only what changed.
  • fix(agent-poll): forced looks and a failing query no longer launch PowerShell nonstop (core 0.41.1) #238 spaced forced looks (5 s in main, one ask per 15 s per tab). A Claude that lived about three seconds (the test's) could come and go between two looks, so the poll's "no agent" was unchanged, never sent, and the mark stayed.
  • The failing runs' terminal shows Claude did exit (^C then the PS prompt). The CSS in that TERM TAIL is xterm 6's own <style> inside .xterm, not shell input.

Fix (agentArm.ts)

  • When the title stops naming an agent only the title vouched for, the poll is asked for its answer (recheck, the existing termAgentAgain path), which it sends at the next look even inside the backoff.
  • MEASURED (Claude Code 2.1.301 in a ConPTY, 2026-10-16): quitting, Claude writes an empty title, then ConPTY restores powershell.exe, so a real exit always ends the title.
  • The prompt (OSC 9;9) does NOT ask: a first version did, and the e2e's stand-in agents (a pwsh prompt between steps) lost their hook state (4 agentHooks/indicator checks failed). A real agent's prompt comes after its title ended anyway.
  • One extra process query per such exit; nothing per frame.

Tests: a new agentArm test fails on main's code and passes (the measured exit titles); a poll test confirms an asked "no agent" is sent unchanged inside the backoff. Unit 2231 pass, typecheck clean, lint 0 errors. e2e indicator, agentHooks 43/43, agentDiag, agentKeys, backgroundWork, termReplies, paste, imagePaste, indicatorStyles all pass.

Core change: Prism gets it with the next pin. Core 0.41.5 -> 0.41.6, app 0.55.5 -> 0.55.6.

🤖 Generated with Claude Code

https://claude.ai/code/session_017XYVRPzvhLpPCr75uB6uaA

Maxaubert and others added 2 commits October 16, 2026 11:43
…(core 0.41.6)

The agent mark goes up on Claude's title and only the process poll takes
it back. Since #238 spaced the forced looks, a Claude that lived a few
seconds could come and go between two looks: the poll's "no agent" was
unchanged, so never sent, and the mark stayed. Prism's full e2e caught it
("claude leaving clears the detection", core 0.41.2, twice).

When the title stops naming an agent only the title vouched for, or the
prompt comes back after one, the poll is now asked for its answer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017XYVRPzvhLpPCr75uB6uaA
MEASURED (Claude Code 2.1.301, 2026-10-16): quitting, Claude writes an
empty title and ConPTY then restores the shell's, so a real exit always
ends the title. Asking on the prompt too wiped the hook state of the
e2e's stand-in agents (a pwsh prompt between steps): 4 agentHooks and
indicator checks failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017XYVRPzvhLpPCr75uB6uaA
@Maxaubert
Maxaubert merged commit cd26356 into main Oct 16, 2026
2 checks passed
@Maxaubert
Maxaubert deleted the fix/title-agent-recheck branch October 16, 2026 11:01
github-actions Bot pushed a commit that referenced this pull request Oct 16, 2026
…(core 0.41.6) (#243)

* fix(indicator): a short-lived Claude no longer leaves its tab marked (core 0.41.6)

The agent mark goes up on Claude's title and only the process poll takes
it back. Since #238 spaced the forced looks, a Claude that lived a few
seconds could come and go between two looks: the poll's "no agent" was
unchanged, so never sent, and the mark stayed. Prism's full e2e caught it
("claude leaving clears the detection", core 0.41.2, twice).

When the title stops naming an agent only the title vouched for, or the
prompt comes back after one, the poll is now asked for its answer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017XYVRPzvhLpPCr75uB6uaA

* fix(indicator): only the title's end asks the poll again, not the prompt

MEASURED (Claude Code 2.1.301, 2026-10-16): quitting, Claude writes an
empty title and ConPTY then restores the shell's, so a real exit always
ends the title. Asking on the prompt too wiped the hook state of the
e2e's stand-in agents (a pwsh prompt between steps): 4 agentHooks and
indicator checks failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017XYVRPzvhLpPCr75uB6uaA

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.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.

1 participant