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
VSCode terminals: TUI render artifacts on first open — initial Pseudoterminal dimensions are ignored #737
When opening an architect or builder terminal in VSCode (Codev extension), Claude Code's TUI renders with overlapping content: the streaming response and the input box's cursor occupy the same screen region, producing artifacts like a cursor block (`▌`) appearing in the middle of transcript text.
The artifact disappears immediately if the user resizes the VSCode terminal panel by even one pixel.
Reproduction
Open VSCode in a Codev workspace
Open the architect terminal (sidebar click, command palette, or keybinding)
Have Claude Code stream a response longer than ~24 lines
Observe: streaming content and input-box cursor render on top of each other
Resizing the panel after the artifact appears clears it.
Root cause
`packages/vscode/src/terminal-adapter.ts:37-44` — the `open()` callback receives `initialDimensions` from VSCode but discards them (parameter is prefixed `_`):
Tower spawns the PTY at `node-pty`'s default (80×24)
VSCode renders the terminal at the real panel size (e.g. 200×60)
Claude Code queries PTY size → gets 80×24
Claude Code anchors its input box at row 24
Streaming transcript flows past row 24
In the real 60-row xterm viewport, input box and transcript collide
`setDimensions()` only fires on subsequent resizes, not on initial open — so the desync persists until the user manually nudges the panel.
Fix sketch
In `open()`, store `initialDimensions`. In `ws.on('open')` after auth is sent, call `sendResize(cols, rows)` if initial dimensions are set. Keep the existing `replaying` guard so resume-from-replay still defers correctly.
~10 LOC change in `packages/vscode/src/terminal-adapter.ts`.
Test
Unit: assert that `sendResize` is invoked once on WebSocket open when `open()` was called with non-null dimensions.
Manual: open a fresh terminal at a non-default panel size, stream >24 lines of content, confirm no overlap without resizing.
Scope
AIR — single-file bugfix, no spec/plan needed.
References
`packages/vscode/src/terminal-adapter.ts:37-44` — the bug
`packages/vscode/src/terminal-adapter.ts:66-73` — `setDimensions` flow this should mirror
Activity
[Bugfix cluesmith#737] Fix: sync Tower PTY dimensions on terminal open