Skip to content

[BUG] Post-compact screen overwrites existing terminal content instead of clearing (PowerShell / Windows Terminal) #35803

Closed as duplicate

Description

@RajeevRKC

Environment

  • OS: Windows 11 Pro (10.0.26200)
  • Terminal: PowerShell in Windows Terminal
  • Claude Code: Intermittent across multiple versions (current and prior)

Description

After context compaction (auto or manual /compact), the post-compact redraw overwrites the existing terminal content in-place rather than clearing the screen first. This leaves visual residue — fragments of the pre-compact output bleed through behind the new content, making the session unreadable.

The screenshot below shows the post-compact state where raw JSON/markdown from the compacted context summary renders on top of the previous tool-call output (Read operations, file paths, line counts), producing garbled overlapping text.

Expected Behavior

Post-compact should clear the viewport (or scroll past existing content) before rendering the fresh state, so the user sees a clean post-compact screen.

Actual Behavior

New content renders on top of old content at the same cursor position, producing garbled overlapping text. The pre-compact output (tool calls, file reads) remains visible underneath the post-compact summary.

Reproduction

  1. Start a Claude Code session in PowerShell (Windows Terminal)
  2. Run enough conversation to trigger auto-compact (or run /compact)
  3. Observe that the post-compact screen overwrites existing terminal lines instead of clearing first

Frequency: Intermittent — does not happen every compact, but has appeared across multiple versions. Not always reproducible on demand.

Screenshot

Post-compact rendering residue

(Visual shows pre-compact Read tool output bleeding through post-compact summary text)

Related Issues

Activity

  1. added
    bugSomething isn't working
    platform:windowsIssue specifically occurs on Windows
    duplicateThis issue or pull request already exists
    on Mar 18, 2026
  2. github-actions commented on Mar 18, 2026

    @github-actions

    Found 3 possible duplicate issues:

    1. [BUG] Windows: cmd (Command Prompt) rendering issue - text overlapping and garbled display since v2.1.3~v2.1.5 #19637
    2. [BUG] Terminal rendering corruption in tmux - text overlaps and overwrites previous output #29937
    3. [BUG] Claude Code interactive TUI in Konsole 23.08.5 — overwrites existing screen output instead of starting at current cursor position #19737

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  3. github-actions commented on Mar 22, 2026

    @github-actions

    This issue has been automatically closed as a duplicate of #19637.

    If this is incorrect, please re-open this issue or create a new one.

    🤖 Generated with Claude Code

  4. github-actions commented on Mar 29, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  5. locked as resolved and limited conversation to collaborators on Mar 29, 2026
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

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions