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 tab repeats its scrollback when shown again #6330
A terminal tab in the right sidebar repeats its scrollback each time you show it again. No reconnect is needed.
Steps
Open a workspace, then the Terminal tab.
Run seq 1 200.
Select another tab (for example Artifacts), then select Terminal again.
Result: the terminal buffer grows from about 200 lines to about 340, and most of the numbers 1..200 show twice. Each further tab switch adds another copy.
Expected: the terminal shows each line once.
Measured on origin/main cccfd9e0d1 (202 -> 338 lines, 136 numbers repeated) and on the reconnect stack (#6296).
Cause (from reading the code, not verified with a fix)
A hidden terminal tab stays mounted but stops listening. When it is shown again, TerminalView subscribes to the router again and calls term.clear(), which keeps the scrollback. The router then delivers the cached full screen (with its scrollback) without replace, so it is written on top of the old lines.
The replace path that #6304 added for a reattach (writeScreenState(term, state, replace), a VT full reset before the screen) would also fix this case if a re-subscribe that already shows content used it.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high
Activity
🤖 refactor: the terminal router keeps its sessions across a reconnect (…
ThomasK33 commentedon Oct 14, 2026
The workspace
artifacts-yr22took this back and is working on it now (branchfix/terminal-scrollback-on-show).Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high🤖 feat: keep the last API client while reconnecting (the switch) (cod…