Skip to content

tui: long answers from interactive (full-screen TUI) harness sessions render run-together / unreadable #321

Description

@edwin-zvs

Summary

A long answer from an interactive (full-screen-TUI) harness session (reproduced with an interactive codex session) renders run-together / with line breaks lost in the agentd pane, both in the live tail and when scrolled back — making it very hard to read once the answer exceeds the viewport.

Observed text (a numbered list the agent printed one-per-line) comes out concatenated:

… over the lazy dog1. CODEX line 2 — the quick brown fox jumps over the lazy dog2. CODEX line 3 — …

i.e. each list item runs straight into the next with no line break.

Important contrast

  • Headless claude/codex sessions (plain streamed text) render the same list cleanly, one item per line, and scroll fine with C-x [ — verified.
  • The breakage appears with interactive sessions where the harness runs its own full-screen TUI.

Repro

  1. agent new codex "" --cwd <repo> (interactive PTY).
  2. agent send <id> "Print a numbered list 1 to 60, one per line: 'CODEX line N — the quick brown fox jumps over the lazy dog'."
  3. In the TUI, select it, C-x z to zoom; observe the answer is run-together; scrolling up keeps it run-together.

Status

Observed/reproduced via screenshots (vhs). Root-cause investigation in progress — checking whether the captured PTY bytes contain the newlines (renderer drops them) vs. the harness TUI emitting a reflowing paragraph / alt-screen, and whether pane↔harness width mismatch is involved. Will follow up with findings.

Related: #89 (per-client PTY width conflicts), #239 (resize history re-feed).

Found dogfooding scroll-up of long answers across harness sessions in the TUI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions