warp icon indicating copy to clipboard operation
warp copied to clipboard

Input prompt box renders mid-output and truncates content during long-running TUI sessions (Claude Code)

Open ART-Aristocraat opened this issue 7 months ago • 8 comments

Pre-submit Checks

Describe the bug

When running Claude Code (Anthropic's TUI CLI) inside Warp, the input prompt box (the > line plus the status bar with model/cost/context) renders in the middle of the scrollback while the agent is still streaming output. The prompt box appears above content that is still being written; lines above and below get visually clipped or overwritten and remain truncated in the buffer.

Reproduces consistently across multiple independent Claude Code sessions in different working directories, so it is not tied to a specific repo or command. Other TUI apps (vim, htop, lazygit) do not show this in the same Warp build, so the trigger seems specific to Claude Code's alt-screen + streaming-redraw pattern (heavy diff blocks + tool-use blocks streaming while background shells are still running).

To reproduce

  1. Open Warp v0.2026.04.15.08.45.stable_04 on macOS 26.2.0.
  2. Run claude in any project directory to start a Claude Code session (Opus 4.7, 1M context).
  3. Give it a long-running task that streams a lot of output (e.g. "refactor this route handler and run type-check") so it produces many diff hunks + bash output back-to-back.
  4. While Claude is still working (status: Jitterbugging… / Crunched for Xs · N shells still running / Brewed for Xs), watch the terminal.
  5. The input box (> + Opus 4.7 (1M context) | … | accept edits on …) renders mid-stream; further diff lines print BELOW it; lines above get clipped.

Expected behavior

The input prompt should stay anchored at the bottom of the viewport. Streaming output from a running TUI app should not be interrupted or overlapped by the prompt rendering in the middle of the scrollback.

Screenshots, videos, and logs

Image Image Image

Operating system (OS)

Select an OS

Operating system and version

26.2.0

Shell Version

No response

Current Warp version

v0.2026.04.15.08.45.stable_04

Regression

No, this bug or issue has existed throughout my experience using Warp

Recent working Warp date

06.04.2026

Additional context

  • Affected app: Claude Code CLI (Anthropic), Opus 4.7 model, 1M context mode.
  • Resizing the window does not fix it; the clipped lines stay clipped in scrollback.
  • Correlates with high-throughput streaming (many diff blocks + tool-use blocks at once) and/or background agents still running ("N shells still running").
  • Reproducible across different repos and different sessions — not project-specific.

Does this block you from using Warp daily?

Yes, this issue prevents me from using Warp daily.

Is this an issue only in Warp?

Yes, I confirmed that this only happens in Warp, not other terminals.

Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e

None

ART-Aristocraat avatar Apr 29 '26 03:04 ART-Aristocraat

can i take this, would you assign it to me @ART-Aristocraat

adhilroshan avatar Apr 29 '26 05:04 adhilroshan

@oz-agent This smells like an alt-screen cursor/state desync rather than a generic rendering issue.

Why:

  • reproducible with Anthropic Claude Code
  • not reproducible in normal TUIs like vim/htop/lazygit
  • appears under high-frequency streaming + redraws
  • input box renders mid-buffer while output continues below

That suggests Warp’s input overlay may be anchoring against a stale cursor row / viewport origin during rapid alternate-screen invalidations.

Possible failure shape:

Claude Code alt-screen redraw
→ diff/tool blocks stream
→ cursor moves / viewport scrolls
→ Warp prompt overlay recomputes before terminal state fully settles
→ prompt anchors to stale row N
→ subsequent output continues at row N+K
→ visual overlap / clipped buffer

Places worth checking:

  • alt-screen enter/exit handling
  • cursor position reconciliation after batched PTY writes
  • viewport height recomputation when the status/input bar is visible
  • render ordering between terminal buffer flush and prompt overlay paint

Concrete fix direction:

Make prompt overlay positioning depend on the final committed terminal frame, not intermediate cursor state during streaming.

Pseudo-order:

PTY batch
→ apply terminal mutations
→ finalize cursor + scroll region
→ commit frame
→ compute prompt anchor
→ paint overlay

This feels like a frame-ordering bug under bursty TUI redraw patterns, not a Claude-specific bug.

Manoj7ar avatar Apr 29 '26 17:04 Manoj7ar

@oz-for-oss[bot]

I'm implementing this issue with no spec context.

You can view the conversation on Warp.

Powered by Oz

warp-for-oss[bot] avatar Apr 29 '26 17:04 warp-for-oss[bot]

Hey @ART-Aristocraat Thanks for the report. I have a couple of questions.

  • How consistent is this? Are you noticing this all of the time?
  • When you do see it, does the input stay in the middle of the screen? Or when claude writes new text to the screen does the input appear in the correct place?
  • Can you confirm, this looks like the claude input section, not the Warp Rich Input for CLIs, correct?

kevinchevalier avatar May 01 '26 17:05 kevinchevalier

Yes, it happens quite often, and complicates the process, because Some details of the discussion with Claude are doubled, or disappear altogether, As if they're stuck somewhere in between, I don't know how to explain it, but the context of the answer In the sense of somewhere hidden behind UI Warp, and it is not always possible to dig up to The truth, you have to think about it yourself.

Image

ART-Aristocraat avatar May 04 '26 05:05 ART-Aristocraat

I haven't been able to reproduce this. I'm hoping that the fix for #9838 also resolves this issue.

kevinchevalier avatar May 04 '26 16:05 kevinchevalier

No, that didn't solve the problem, still observing this problem to this day

ART-Aristocraat avatar May 05 '26 23:05 ART-Aristocraat

this is still happening today. thanks for your time guys

rrenteria-dev avatar Aug 20 '26 22:08 rrenteria-dev