Background agent panel resizing shifts the entire transcript and input box vertically while typing
Environment
- Claude Code 2.1.234.0
- Windows 11 Home 10.0.26200
- Terminal: herdr 0.8.0-preview (terminal multiplexer), 48-row panes
- Not multiplexer-specific — see "Not the terminal" below
Summary
The background-agent panel at the bottom of the TUI (↓ to manage / /tasks to see subagents) is bottom-anchored and changes height as background agents start and finish. Every height change moves the input box and the whole transcript vertically. Because agents start and finish while the user is typing, the input box moves out from under the cursor mid-sentence.
Steps to reproduce
- Start a session in a terminal with a fixed viewport height.
- Launch background agents (e.g. via the Agent tool) so the bottom panel appears.
- Type a long message into the input box, and keep typing while agents finish.
- Observe the input box and transcript jump vertically each time an agent appears or completes.
Measured behaviour
Layout: transcript, then input box (3 rows), then the status line, then a blank row, then ● main plus one row per background agent — all anchored to the bottom of the viewport.
Status-line row (0-indexed, 48-row viewport) = 47 − (panel rows + 1); 47 when no panel.
| Panel contents | Status line row |
|---|---|
| none | 47 |
| main + 1 agent | 44 |
| main + 2 agents | 43 |
So: 1 row per agent added/removed, and 3 rows when the panel appears or disappears entirely.
Captured full-screen before/after, 9 seconds apart, same pane:
| | panel absent (08:01:00) | panel present (08:01:09) |
|---|---|---|
| Tip: line | row 43 | row 40 |
| input box border | rows 45–47 | rows 42–44 |
| agent panel | — | rows 47–48 |
The transcript moved up 3 rows. At that moment the user was mid-sentence in the input box.
Frequency: during an active session the input-box row changed 7 times in 116 seconds (rows 46→43→46→43→48→43→47→46) — roughly once every 17 seconds, travelling up to 5 rows, twice within a 2-second span.
Not the terminal
Measured the multiplexer's own scroll state at 500 ms intervals for 2 minutes across all 8 panes (1088 samples): scroll offset, max scroll offset, and viewport height were constant the whole time (0, 0, and 48). Nothing scrolled and nothing resized — the movement is entirely inside Claude Code's own layout. It also reproduces in a single-pane tab, and reproduces in a second, independent pane belonging to a different session.
Impact
Text does not get lost, but the caret's screen position moves while typing, which is disorienting during long messages. It is worse for users who delegate heavily to background agents, since the panel then changes constantly.
Workaround, and why it is not enough
disableAgentView / CLAUDE_CODE_DISABLE_AGENT_VIEW=1 stops the movement, but it disables background agents entirely (claude agents, --bg, /background, the on-demand supervisor). For users who rely on background agents that is a bigger loss than the problem.
Suggested fix
Reserve the panel's vertical space instead of collapsing it — e.g. keep a fixed-height region once the panel has been shown, or anchor the input box at a stable row and let the panel grow downward/scroll internally, so that adding or removing an agent never repositions the input box or the transcript.
Related but distinct issues
Searched before filing; these are the closest existing reports, and each has a different trigger or symptom:
- #70432 — status line oscillates ±1 row while a background task runs. That is a blank status row toggling on a redraw timer (a 2.1.186 regression) and oscillates even while idle; this report is driven by the agent count changing.
- #57510 — closing the background-task detail panel leaves dead viewport space. That is a static leftover region; this is a repeated dynamic height change.
- #86128 — background task/agent notifications interrupt in-progress typing. That is notification text entering the input box; this is the input box itself shifting vertically.