claude-code - 💡(How to fix) Fix [Bug] Agent view attachment lacks scrollback history for background sessions

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

Describe the bug: When I attach to a background session from agent view (Enter / →), the terminal only shows a redrawn live viewport. I cannot scroll up to see earlier conversation history — long messages have their top cut off, and tmux copy-mode (Ctrl+B [) finds nothing because the history was never written into the terminal scrollback.

Code Example

[]
RAW_BUFFERClick to expand / collapse

Bug Description Title: Attaching to a background session in agent view has limited scrollback — can't scroll up to view earlier history

Environment:

  • Claude Code version: 2.1.156
  • OS: macOS (Darwin 25.3.0)
  • Terminal: tmux + kitty

Describe the bug: When I attach to a background session from agent view (Enter / →), the terminal only shows a redrawn live viewport. I cannot scroll up to see earlier conversation history — long messages have their top cut off, and tmux copy-mode (Ctrl+B [) finds nothing because the history was never written into the terminal scrollback.

Opening the same session with claude --resume <id> works fine: the full history loads into the terminal and scrolls normally.

To Reproduce:

  1. Start a background session and have it produce a message longer than the terminal height (e.g. claude --bg "...").
  2. Open agent view (claude agents) and attach to that session (Enter).
  3. Try to scroll up / use tmux Ctrl+B [ — earlier content is unreachable.
  4. Detach (←), then claude --resume <same id> — history scrolls fine.

Expected: Attached sessions should expose the same scrollable history as claude --resume.

Actual: Attach view is a limited live viewport; earlier history is not in scrollback.

Notes: agent-view.md "Limitations" lists quota / local-run / worktree deletion but does not mention this scrollback limitation. Likely inherent to attaching to the supervisor-hosted PTY, but undocumented.

Environment Info

  • Platform: darwin
  • Terminal: kitty
  • Version: 2.1.156
  • Feedback ID: 930791b6-7650-4d66-aa48-55fa7392266c

Errors

[]

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [Bug] Agent view attachment lacks scrollback history for background sessions