Skip to content

[Bug]: Integrated terminal renders stale and garbled output that diverges from the shell #7644

Description

@kyleawayan

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

  1. Open the integrated terminal (Cmd+J).
  2. 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.py and a trailing 64 I 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)

Image

when lazygit is supposed to look like (screenshotted in the ghostty app terminal window):

Image

Impact

Major degradation or frequent failure

Version or commit

main @ 3b72d17 (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: kyleawayan@95cd5c2. If it holds up after a few days I plan to open a PR.

Activity

  1. added
    bugSomething is broken or behaving incorrectly.
    needs-triageIssue needs maintainer review and initial categorization.
    on Aug 20, 2026
  2. juliusmarminge commented on Oct 2, 2026

    @juliusmarminge
    Member

    Thanks for taking the time to report this and provide the details. We revisited it during the orchestrator V2 cleanup.

    Current terminal output uses generation/reset cursors and offset-based append updates instead of comparing retained-buffer prefixes. This directly addresses the cap-trimming reset/replay failure identified by the reporter's linked patch, which was read.

    I’m closing this based on the current source and the evidence in this thread.

    Source reviewed.

    Source-level resolution of linked mechanism; unrelated renderer bugs or gaps larger than retained output may still need fresh reproduction.

    If you still hit this on a current build, please reply with the app/server versions and the steps that reproduce it. We can reopen this if the original problem is still there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions