[Bug]: Integrated terminal renders stale and garbled output that diverges from the shell
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 23k
- Forks
- 5.9k
- Avg merge
- 11h 14m
- Merged PRs (30d)
- 357
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
- Open the integrated terminal (Cmd+J).
- Reproduce one of two ways:
- With zsh-autosuggestions on, type at the shell. In a terminal that has already been used, leftover characters appear almost immediately.
- Or run lazygit and leave it open. Within about a minute, once it does background refreshes I think, it starts dropping lines and garbling the header.
Expected behavior
The terminal renders what the shell actually holds. Old content clears when it should, and the screen stays consistent with the real terminal.
Actual behavior
The rendered screen drifts out of sync with the real terminal. Two forms I hit:
- lazygit drops rendered lines and leaves fragments of earlier output stuck at the top, overlapping the panel borders (see screenshot).
- zsh-autosuggestions leaves a stray character or space on screen that is not in the command buffer, so a command runs differently from what is shown. I have seen
pypython script.pyand a trailing64I never typed.
Both are the same problem: the drawn grid no longer matches the real terminal contents.
e.g. in lazygit, within a minute or so, you get garbled rendering like this (see the top header colliding with text that's not supposed to be there + lazygit separator lines missing)
when lazygit is supposed to look like (screenshotted in the ghostty app terminal window):
Impact
Major degradation or frequent failure
Version or commit
main @ 3b72d17cbca691f0b64e6d4a10c9e349f42873a5 (v0.0.33 tag)
Environment
macOS 26.5.2 Desktop App
Logs or stack traces
Screenshots, recordings, or supporting files
See "Actual behavior" section
Workaround
I am running a build with a patch for this on my fork and watching how it holds: https://github.com/kyleawayan/t3code/commit/95cd5c235e649af49ea1b3a73c0f46e53b8d4cdc. If it holds up after a few days I plan to open a PR.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the apps/web area and reproduce both reported cases: zsh-autosuggestions in a previously used terminal and lazygit during background refreshes. Compare the rendered terminal with the shell’s actual contents, using the linked fork patch as investigation context; done means stale characters, dropped lines, and garbled borders no longer appear in either scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, zsh
- Domain
- cli, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100