Skip to content

Terminal Output: Repeated Content When Scrolling During Streaming Responses #1659

@nxpatterns

Description

@nxpatterns

Describe the bug

When using Open Interpreter via API or CLI to stream responses in the terminal, previously generated output lines repeatedly appear in the scroll-back buffer each time I scroll up. This phenomenon occurs in nearly every terminal, regardless of whether the backend is OpenAI, Claude, or others.

What Happens and Why It Matters

We understand that this is likely related to how streaming responses and terminal rendering interact, possibly due to ANSI codes or repeated redraws. However, the duplication of output makes it very difficult to review or copy responses and clutters the entire scrollback, impacting usability and readability.

Reproduce

  1. Run Open Interpreter in any popular terminal (e.g., GNOME Terminal, iTerm2, Windows Terminal).
  2. Start a session with streaming output enabled.
  3. Scroll up in the terminal while the response is being generated.
  4. Notice that the same content appears many times in the scroll history.

Expected behavior

The output should appear only once in the scroll-back buffer, and scrolling up should show clean, non-duplicated content corresponding to what was displayed.

Screenshots

No response

Open Interpreter version

Open Interpreter 0.4.3 Developer Preview

Python version

Python 3.13.7

Operating System name and version

macOS Sequoia 15.6

Additional context

Could the experts suggest a robust workaround or fix to prevent the terminal output from duplicating during streaming? Are there recommended settings, environment variables, terminal modes, or code changes that could solve this issue?

We appreciate any insights or technical guidance, and wanted to show a clear understanding of the underlying technical factors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions