[BUG] Agent view: scrolling inside attached session leaves stale left-column artifacts (Windows Terminal 2.1.141)

Status Fixed / completed
Reported on v2.1.141
Maintainer reply ✓ Yes — bogini
Activity 5 comments · opened May 14, 2026 · closed May 14, 2026
💡 Likely answer: A maintainer (bogini, collaborator) responded on this thread — see the highlighted reply below.

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When attached to a session inside agent view (claude agents → select a row → Enter), scrolling the transcript leaves stale character cells in the leftmost columns. The artifacts appear to be fragments of previously rendered frames (markers such as X, 2., 3., //, , 🎯 from earlier content) that the redraw fails to clear.

Ctrl+L forces a full redraw and clears the artifacts, but they reappear on the very next scroll action.

Key observation: This bug is specific to the agent-view attach path. Launching a session directly with claude and scrolling produces NO artifacts. The stale left-column cells only appear when attaching to a session via claude agents → select row → Enter.

The transcript content that reliably triggers this contains:

  • CJK (Traditional Chinese) text
  • Box-drawing characters forming tables (├─┼─┤, , etc.)
  • Emoji status markers (✅ ❌ ⚠ 🎯)
  • Mixed-width characters on the same line

Reproduction

  1. Have a session whose transcript contains CJK + a box-drawing table + emoji markers.
  2. Run claude agents.
  3. Select the session and press Enter to attach.
  4. Scroll up/down with mouse wheel or PgUp / PgDn.
  5. Observe stale character cells along the leftmost columns of the viewport.
  6. Press Ctrl+L — artifacts clear.
  7. Scroll again — artifacts return immediately.
  8. Exit agent view and launch claude directly — scroll the same content — NO artifacts.

Environment

  • Claude Code version: 2.1.141
  • OS: Windows 11
  • Terminal: Windows Terminal (default profile, default font: Cascadia Mono)
  • Shell: PowerShell
  • CLAUDE_CODE_NO_FLICKER: tested with both 0 and 1 — both reproduce identically

What I've Already Ruled Out

  • Not terminal-emulator specific. Reproduced identically on both Windows Terminal and WezTerm, so this is not a wide-character / column-width issue in the emulator.
  • Not NO_FLICKER mode specific. Reproduces with CLAUDE_CODE_NO_FLICKER=0 and =1, suggesting the bug is in the higher-level diff/redraw layer rather than the rendering backend.
  • Not fixed by recent CHANGELOG entries. Running 2.1.141, which already includes:
  • "Fixed scroll behavior in Windows Terminal and VS Code when attached to background sessions"
  • "Fixed border-embedded text overflowing on CJK/emoji due to visual cell width miscalculation"
  • "Fixed wide markdown tables leaving a stale bordered render in terminal scrollback while streaming"

These look related but do not cover this specific symptom.

<img width="1280" height="758" alt="Image" src="https://github.com/user-attachments/assets/9f745e02-6f06-40ea-a345-30c6ef0674c5" />

What Should Happen?

Scrolling the transcript should fully repaint every column on every scroll tick automatically, matching what Ctrl+L produces.

Error Messages/Logs

### Suspected Root Cause

The direct `claude` launch path does not reproduce this, which strongly suggests the bug is in the **attach/re-attach viewport initialization logic** — the code path that restores an existing session's transcript into the TUI — not in the general scroll rendering layer. Likely the incremental diff is failing to track column width correctly for mixed CJK / box-drawing / emoji content when the viewport is restored from a detached state.

### Screenshots

(請將我提供的兩張截圖 attach 在此處)

Steps to Reproduce

  1. Have a session whose transcript contains CJK + a box-drawing table + emoji markers.
  2. Run claude agents.
  3. Select the session and press Enter to attach.
  4. Scroll up/down with mouse wheel or PgUp / PgDn.
  5. Observe stale character cells along the leftmost columns of the viewport.
  6. Press Ctrl+L — artifacts clear.
  7. Scroll again — artifacts return immediately.
  8. Exit agent view and launch claude directly — scroll the same content — NO artifacts.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Windows 11

Claude Code Version

2.1.141

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

5 Comments

bogini collaborator · 3 months ago

Thanks for the report — confirmed and fixed. Same root cause as #58487: a Windows-specific rendering issue that affected local Windows Terminal / PowerShell users. Ships in v2.1.143.

saichandunannapanenicopilot · 3 months ago
kanetik · 3 months ago

Updated to 2.1.413 and while the issue seems better, it is not gone. Scrolling up through conversation history still leaves artifacts along the left rail, and they accumulate the more you scroll. The good news is (so far) the contents of the main part of the window seem to stay clear of misplaced text, which is much better. Just hard to read the start of some lines when parts of other lines collide with them.

<img width="692" height="750" alt="Image" src="https://github.com/user-attachments/assets/82ffc0e9-b56a-486a-ba67-314e89efa570" />

kanetik · 3 months ago

One thing that has gotten worse is the agents view (where you see all the active background agents):

<img width="1457" height="656" alt="Image" src="https://github.com/user-attachments/assets/bb4e3980-0cac-413d-af94-ed90efe605c0" />

github-actions[bot] · 1 month ago

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.