[Bug] Agent view attachment lacks scrollback history for background sessions

Open 💬 0 comments Opened May 29, 2026 by shy-robin

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 "...").

  1. Open agent view (claude agents) and attach to that session (Enter).
  2. Try to scroll up / use tmux Ctrl+B [ — earlier content is unreachable.
  3. 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

[]

View original on GitHub ↗