Transcript permanently blank when the terminal is resized (or a panel opens) at the instant the first message is submitted — turn runs and persists, never renders
Symptom
If the transcript's width changes at the instant you submit the first message of a conversation — a terminal resize, or a side panel opening — the turn runs and is saved, but the transcript never renders it: no user message, no response, and no amount of scrolling, resizing, or waiting brings it back. To the user it looks like Claude ate the prompt (the only hint something happened is the status widget flipping).
Render-only: the session .jsonl contains both the user and assistant entries.
Repro (2 commands, ~30 s, no credentials needed)
On a plain origin/main dev build (sha5230446, 2026-07-04) in an isolated config dir:
CFG=/tmp/blank-repro; mkdir -p $CFG/cwd
printf '{"hasCompletedOnboarding":true,"theme":"dark"}' > $CFG/.claude.json
tmux new-session -d -s blank -x 170 -y 44 "env CLAUDE_CONFIG_DIR=$CFG IS_DEMO=1 bash"
tmux send-keys -t blank 'cd '"$CFG"'/cwd && claude' Enter # wait for the idle prompt
then the gesture — the send-keys and the resize must land back-to-back (one client call):
tmux send-keys -t blank -H 68 65 6c 6c 6f 0d \; resize-window -t blank -x 120 -y 44
Result: the transcript body stays empty forever (End, PageUp, further resizes do nothing), while $CFG/projects/**/<session>.jsonl contains the user ("hello") and assistant entries. Without the resize, the same submit renders in ~0.5 s.
Isolation matrix (all under the same harness)
| gesture in one instant | transcript renders? | on disk |
|---|---|---|
| Enter alone | yes | yes |
| Enter + a letter in the same stdin read | yes | yes |
| Enter + lone ESC in the same read | yes | yes |
| Enter + terminal resize | no — permanently | yes |
| Enter + a width-changing panel opening (session-rail branch) | no — permanently | yes |
The panel case reproduces even with that feature disabled by config, and the resize case reproduces on a pure main build — so this is not specific to any feature branch; any same-instant width change triggers it.
What the debug log shows
--debug-file for the failing run: tengu_input_prompt → tengu_api_query → the turn completes (tengu_feature_ok {"feature_name":"turn"}, history_save) — no exception, no error, no scroll yank — and no render of the messages ever happens. The full-scrollback capture contains zero occurrences of the prompt text (nothing scrolled away; it was never written).
Suspected area (unconfirmed)
useVirtualScroll's resize protocol: on a columns change it rescales heightCache, sets skipMeasurementRef, and freezes the mounted range for 2 renders (prevRangeRef / freezeRendersRef). A message whose first mount lands inside that freeze window — the range was captured over an empty list — never enters the mounted range, and the file's own comments describe two earlier "blank viewport / effLo inflated" incidents in this machinery. The failure is durable (nothing re-measures the never-mounted rows).
Impact
- Any user who resizes / snaps their terminal window right as they hit Enter on the first message of a session loses the visible conversation for that session ("Claude ate my prompt" reports).
- The window gets easier to hit as more width-changing UI (side panels that auto-open) ships.
Versions: reproduced on 2.1.202-dev.20260704.t132714.sha5230446 (pure main) and a same-day feature build; Linux x64 native build under tmux (TERM=xterm-256color, fullscreen renderer).