Skip to content

Subagent TUI corrupts live message text while raw rollout is correct #15001

@palvaleri

Description

@palvaleri

What version of Codex CLI is running?

codex-cli 0.115.0

Which model were you using?

gpt-5.4

What platform is your computer?

Darwin arm64 (macOS)

What terminal emulator and version are you using (if applicable)?

Codex desktop / Codex TUI on macOS

What issue are you seeing?

In subagent sessions, the live TUI/subagent state surface sometimes corrupts the displayed text even though the raw rollout transcript is correct.

This is not just "markdown renders as plain text". The displayed line can:

  • drop leading characters inside words
  • remove punctuation or whitespace
  • break inline-code boundaries
  • partially mangle words in the middle of a sentence

The raw rollout for the same subagent session still contains the correct message, so this looks like a render/stream stitching bug in the subagent UI surface, not bad model output.

What steps can reproduce the bug?

I currently have two independent real reproductions from 0.115.0 subagent sessions in different worktrees/repos. In both cases, the corrupted text was shown live in the subagent UI surface, while the raw rollout for the same session was correct.

Repro A, subagent session 019cfe23-1c1a-7992-ba9c-86a7033c7c01:

TUI showed a corrupted line like:

• ейты проходят. Проверяю толькоVisual Acceptance`, чтобы корректно закры reviewer-флоу по этому plan и не застрять на неществующей UI-проверке.

But the raw rollout for the same session contains:

Гейты проходят. Проверяю только `Visual Acceptance`, чтобы корректно закрыть reviewer-флоу по этому plan и не застрять на несуществующей UI-проверке.

Repro B, subagent session 019cfe07-ce54-73b3-b5c5-a545aeccf4d5:

TUI showed a corrupted line like:

Evidence собожу reviewer artifact. Открою один-два свежих backend review-файла чтобы сохранить repo-local формат и правильно заироватьS` vs `

But the raw rollout for the same session contains:

Evidence собран; перехожу к reviewer artifact. Открою один-два свежих backend review-файла, чтобы сохранить repo-local формат и правильно зафиксировать `S2` vs `N/A` для visual review.

What is the expected behavior?

The subagent TUI/state surface should display the same text that is present in the raw rollout transcript, preserving characters, whitespace, punctuation, and inline-code boundaries.

Additional information

These two reproductions are useful because they are not the same exact workflow:

  • they come from different worktrees/repos
  • they affect live subagent commentary text, not just one static final handoff line
  • the corruption pattern is similar in both cases
  • the raw transcript remains intact in both cases

This seems related to, but not identical with:

  • #13220 — subagent state markdown rendering is wrong
  • #10901 — main TUI can cut off or oddly space output while the transcript remains correct

My current read is:

  • #13220 is about incorrect markdown rendering in the subagent state surface
  • this bug is about the subagent state surface corrupting the actual displayed text
  • #10901 may share the same underlying rendering/streaming cause, but this report is specifically about subagent live text corruption with the raw rollout remaining intact

Metadata

Metadata

Assignees

No one assigned

    Labels

    TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displaybugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions