You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
terminal: two cursors in the architect terminal on Windows (Spec 1658 finding M2) #1917
On native Windows the architect terminal in the dashboard shows two cursors at once: claude's own drawn cursor and the terminal's cursor. Cosmetic; input and output are correct. Recorded 2026-11-02 on the owner's machine as finding M2 (scenario 3) in codev/reviews/1658-windows-native-non-wsl-support.md, still present at the 2026-11-10 re-check.
What we know
From the Spec 1658 ConPTY render-gate work (finding M15): under ConPTY, claude 2.1.326 sometimes draws a software cursor (an inverse cell over the dim command suggestion) with the hardware cursor hidden, and ConPTY's repaints park that hidden hardware cursor at the end of the last row. The six committed ConPTY captures (packages/codev/src/agent-farm/__tests__/fixtures/gate/conpty/) show the byte stream. The dashboard terminal (xterm.js) may be rendering the hardware cursor even when the stream hid it, or ConPTY may re-show it on repaint; which one is the first thing to establish from the captures.
Fix shape
Replay the committed idle capture in the dashboard terminal and confirm whether the second cursor is drawn by xterm.js (cursor visibility state not tracking DECTCEM across ConPTY repaints) or arrives in the stream (ConPTY re-showing the cursor).
If xterm.js: track cursor visibility from the stream in the terminal component and hide the block cursor while the app has hidden it. If ConPTY: decide whether a Tower-side normalisation is warranted or whether this stays documented as a known cosmetic.
Confirm POSIX terminals are unaffected (the existing macOS render-gate fixtures).
Acceptance
One cursor in the architect terminal on Windows while claude is idle with a command suggestion showing and while it is drawing output.
No change to POSIX rendering; the ConPTY replay suite stays green.
Architect finding (2026-11-18): one confirmed cause, one open question
Confirmed: Tower's replay snapshot drops the cursor-hidden state. On every attach (dashboard load, tab reopen, VS Code terminal open) Tower sends SessionScreen.serialize() (packages/codev/src/terminal/session-screen.ts:207, used by PtySession.replaySnapshot) instead of the raw history. @xterm/addon-serialize 0.14.0 does not carry DECTCEM. Minimal check against the repo's installed @xterm/headless 6.0.0:
write: ESC[?25l hello ESC[7m T ESC[27m ry ESC[5;40H
serialize: "hello \x1b[7mT\x1b[0mry\x1b[4B\x1b[30C" (no ESC[?25l)
So after an attach the client xterm.js draws its block cursor although the app hid it. This fits the empty-prompt symptom: in fixtures/gate/claude-conpty-ghost-idle.replay.bin.gz claude hides the cursor once at startup (last DECTCEM in the stream is ?25l), draws its software cursor at the composer's first input cell, and ConPTY leaves the hidden hardware cursor parked at the end of the last row, which is where M2 reports the second cursor. An idle claude never re-sends the hide, so it persists. On POSIX the hardware cursor sits under the inverse cell (per M15), so the same loss would be invisible there; that is an inference, not tested.
So the issue's "xterm.js or ConPTY" fork has a third answer for this part: neither, it is the snapshot.
Open: the second cursor "beside it while typing". In conpty-claude-draft.capture.jsonl.gz ConPTY explicitly shows the hardware cursor next to the typed text (?25l r ESC[K ... ESC[38;4H ?25h). That capture was recorded unfocused and has no software cursor (no ESC[7m), so it cannot say what the live stream does when both are on screen. One capture recorded with the window focused, while typing, discriminates this. If the live stream really shows the cursor there, that half is ConPTY/claude behaviour and the fix-or-document decision in the issue's step 2 still applies to it.
Fix shape for the confirmed part: have the snapshot append ESC[?25l when the mirror's cursor is hidden (the headless terminal knows the state). This touches reconnect replay on every platform, so the round-trip suite (session-screen-serialize.test.ts) needs a hidden-cursor case, and POSIX replay must be shown unchanged otherwise.
Activity
amrmelsayed commentedon Nov 17, 2026
Architect finding (2026-11-18): one confirmed cause, one open question
Confirmed: Tower's replay snapshot drops the cursor-hidden state. On every attach (dashboard load, tab reopen, VS Code terminal open) Tower sends
SessionScreen.serialize()(packages/codev/src/terminal/session-screen.ts:207, used byPtySession.replaySnapshot) instead of the raw history.@xterm/addon-serialize0.14.0 does not carry DECTCEM. Minimal check against the repo's installed@xterm/headless6.0.0:So after an attach the client xterm.js draws its block cursor although the app hid it. This fits the empty-prompt symptom: in
fixtures/gate/claude-conpty-ghost-idle.replay.bin.gzclaude hides the cursor once at startup (last DECTCEM in the stream is?25l), draws its software cursor at the composer's first input cell, and ConPTY leaves the hidden hardware cursor parked at the end of the last row, which is where M2 reports the second cursor. An idle claude never re-sends the hide, so it persists. On POSIX the hardware cursor sits under the inverse cell (per M15), so the same loss would be invisible there; that is an inference, not tested.So the issue's "xterm.js or ConPTY" fork has a third answer for this part: neither, it is the snapshot.
Open: the second cursor "beside it while typing". In
conpty-claude-draft.capture.jsonl.gzConPTY explicitly shows the hardware cursor next to the typed text (?25l r ESC[K ... ESC[38;4H ?25h). That capture was recorded unfocused and has no software cursor (noESC[7m), so it cannot say what the live stream does when both are on screen. One capture recorded with the window focused, while typing, discriminates this. If the live stream really shows the cursor there, that half is ConPTY/claude behaviour and the fix-or-document decision in the issue's step 2 still applies to it.Fix shape for the confirmed part: have the snapshot append
ESC[?25lwhen the mirror's cursor is hidden (the headless terminal knows the state). This touches reconnect replay on every platform, so the round-trip suite (session-screen-serialize.test.ts) needs a hidden-cursor case, and POSIX replay must be shown unchanged otherwise.amrmelsayed commentedon Nov 17, 2026
On it! Working on this with the PIR protocol (plan + dev-approval gates before PR).
[PIR #1917] Plan draft
[PIR #1917] Carry cursor visibility in the attach snapshot
[PIR #1917] Record the M2 cause in the 1658 review; builder thread
[PIR #1917] Plan draft
[PIR #1917] Carry cursor visibility in the attach snapshot
[PIR #1917] Record the M2 cause in the 1658 review; builder thread
[PIR #1917] Thread: Tower incident, holding at the tests check
[PIR #1917] Plan draft
[PIR #1917] Carry cursor visibility in the attach snapshot
[PIR #1917] Record the M2 cause in the 1658 review; builder thread
[PIR #1917] Thread: Tower incident, holding at the tests check
[PIR #1917] Thread: rebase onto #1926, tests-check timeout, orphan sh…
[PIR #1917] Review + retrospective
[PIR #1917] Keep the empty-snapshot desync canary reachable; test the…
[PIR #1917] Consultation dispositions; document the delta-resume and …
Merge pull request #1934 from cluesmith/builder/pir-1917
release notes: backfill Windows follow-ups, test-suite Tower guard, C…