Repository navigation
fix(session): detect finished turns again on Claude Code 2.1.319 - #119
Conversation
Claude Code draws its input-box rules exactly as wide as the terminal, so xterm flags the row after each rule (the `❯` prompt, the footer) as wrapped. readBufferTail joined wrapped rows, glued the prompt onto the rule, and hasReadyPrompt never matched: a finished turn was never "completed", so no notification, sound or "Response ready" state was raised (since v1.42.0). readBufferTail no longer joins a row onto a line that is only a horizontal rule. Real wrapped text is still joined. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ECC Tools / Security EvidenceCommit: Security evidence gate passed (success) No security-sensitive scanner-evidence gap detected. Mode: enforce Scanned 2 changed file(s). No missing scanner-evidence signal was detected. Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
ECC Tools / PR Risk TaxonomyCommit: PR taxonomy review recommended (neutral) Detected 1 PR taxonomy bucket(s): CI/CD Recommendation. Scanned 2 changed file(s). Roadmap taxonomy buckets: CI/CD RecommendationCI, dependency, coverage, and contract signals should be routed into follow-up checks or verification work. Signals:
Paths:
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
ECC Tools / Reference Set ReadinessCommit: Reference set readiness gaps detected (neutral) Reference evidence present for 0/7 areas (0%) across 2 changed file(s). This check is based on files changed in this PR. Repository-level readiness is still reported by
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
ECC Tools / Hosted Promotion ReadinessCommit: Hosted promotion readiness passed (success) No hosted promotion evidence gaps detected across 2 changed file(s); 0 corpus scenarios had matching evidence. This check compares PR file changes against the evaluator/RAG promotion corpus in No evaluator corpus scenarios matched this PR. Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
Problem
Since v1.42.0, a finished session raises no notification, no sound, and no "Response ready" state.
Cause
Claude Code draws its input-box rules (
────) exactly as wide as the terminal, so xterm flags the next row (the❯prompt, the footer) as wrapped.readBufferTail(added in 1a4d634) joins wrapped rows, so the prompt was glued onto the rule andhasReadyPromptnever matched. The turn was never counted as completed.Fix
readBufferTailno longer joins a row onto a line that is only a horizontal rule. Real wrapped text is still joined.Verification
terminalScreen.test.tsusing the screen captured from Claude Code 2.1.319: fails before, passes after.npx vitest run src/lib src/hooks/useSessionStateDetection.test.ts src/components/insight: 842/842 pass.npx tsc --noEmitclean.hasReadyPromptfalse and attention never pending; after, attention pending and the sidebar shows "Response ready".Generated with Claude Code