[BUG] Opening a session from the agents view leaves its earlier history unreachable — no replay, and the transcript screen silently caps at 30 messages

Status Open
Reported on v2.1.226
Maintainer reply None cached
Activity 0 comments · opened Aug 8, 2026

Summary

Opening an existing session from the agents view (FleetView) mounts it in the current terminal with none of its earlier output. Scrolling up in the terminal shows the agents view chrome and whatever the previous session printed, not the opened session's history. The in-app transcript (ctrl+o) is the only route back to it — and it renders only the last 30 messages, behind a single dim Ctrl+E to show N previous messages line that is easy to miss entirely.

With several worktree sessions open at once, every hop between sessions reads as "my history got truncated."

Environment

  • Claude Code 2.1.226 (native install; build 2026-08-08T00:42:40Z, GIT_SHA e140b3281c1e8d834468889bd0a5c3fd2f15507c)
  • macOS 15.6.1 (24G90), arm64, Node v22.23.2
  • iTerm2 3.6.11, TERM=xterm-256color
  • tui unset → classic main-screen renderer
  • 8 concurrent interactive sessions across git worktrees + 3 background agents (per claude agents --json)

Steps to reproduce

  1. Run several claude sessions in different directories, each with a long transcript.
  2. In session A, press ← twice to open the agents view.
  3. Select session B (enter to open).
  4. Try to scroll up to read B's earlier messages.

Expected

B's history is reachable after opening it — either replayed into the terminal on mount, or presented in full in the transcript view without a silent cap.

Actual

  • Terminal scroll-up shows A's output plus the agents-view chrome. B's output was printed by a different process in a different terminal, so it was never in this terminal's buffer. (Understood — I'm not asking for terminal scrollback to be rewritten.)
  • ctrl+o opens the transcript, which renders only the last 30 messages.
  • The Ctrl+E to show N previous messages banner is the only indication more exists, and it's one dim line.
  • Returning from the agents view also leaves the fleet composer and its enter to open · space to reply · hold space to speak · ctrl+x to delete · ? for shortcuts hint line sitting in the scrollback above the transcript.

Net effect: the session's history is intact on disk (~/.claude/projects/<encoded-cwd>/<sessionId>.jsonl — 643 KB for one of mine) but feels lost at exactly the moment the user has no scrollback to fall back on.

What I found in the binary

From strings over the 2.1.226 Mach-O. Names are minified, so treat this as a pointer rather than gospel.

  • The transcript renderer slices to a constant: Pt = Ne ? gt.slice(-$hl) : gt with $hl = 30, and derives hasTruncatedMessages / hiddenMessageCount from the same constant. The cap applies when the transcript screen is active and neither "show all" nor virtual scroll is on.
  • Banner: ` ${V} to show ${bold(count)} previous messages , where V = Su("transcript:toggleShowAll","Transcript","Ctrl+E")`.
  • Keymap: app:toggleTranscriptctrl+o (Global context); transcript:toggleShowAllctrl+e (Transcript context).
  • The ← path doesn't merely open a view. [PERF:bg-leftarrow-start] feeds a gate returning via: "detach" | "idle-fork" | "defer-then-fork" | "abort-then-fork", alongside [tasks] carry to fork and Couldn't background this session (an internal error was logged). The live session is forked/backgrounded and the fleet view mounts in its place — which is why coming back yields a freshly-mounted transcript rather than the original render.

Suggested fixes

Any one of these would resolve the practical problem:

  1. Make the 30-message cap configurable (a setting, or scale it to terminal height).
  2. Make the Ctrl+E affordance prominent specifically when a session is opened from the agents view — that's the case where the user provably has no scrollback to fall back on.
  3. Replay the last N messages into the terminal on mount-from-agents-view, so native scroll-up works for at least a window of history.

Related

  • #84702 — scroll keys misrouted to prompt history after an ←/→ round trip through the agents view. Same navigation path, different symptom.

View original on GitHub ↗