[BUG] Opening a session from the agents view leaves its earlier history unreachable — no replay, and the transcript screen silently caps at 30 messages
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_SHAe140b3281c1e8d834468889bd0a5c3fd2f15507c) - macOS 15.6.1 (24G90), arm64, Node v22.23.2
- iTerm2 3.6.11,
TERM=xterm-256color tuiunset → classic main-screen renderer- 8 concurrent interactive sessions across git worktrees + 3 background agents (per
claude agents --json)
Steps to reproduce
- Run several
claudesessions in different directories, each with a long transcript. - In session A, press ← twice to open the agents view.
- Select session B (
enter to open). - 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+oopens the transcript, which renders only the last 30 messages.- The
Ctrl+E to show N previous messagesbanner 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 shortcutshint 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) : gtwith$hl = 30, and deriveshasTruncatedMessages/hiddenMessageCountfrom 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, whereV = Su("transcript:toggleShowAll","Transcript","Ctrl+E")`. - Keymap:
app:toggleTranscript→ctrl+o(Global context);transcript:toggleShowAll→ctrl+e(Transcript context). - The ← path doesn't merely open a view.
[PERF:bg-leftarrow-start]feeds a gate returningvia: "detach" | "idle-fork" | "defer-then-fork" | "abort-then-fork", alongside[tasks] carry to forkandCouldn'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:
- Make the 30-message cap configurable (a setting, or scale it to terminal height).
- Make the
Ctrl+Eaffordance 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. - 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.