Skip to content

TUI rendering race condition #441

@krissetto

Description

@krissetto

There seems to be a race condition in the TUI when rendering very fast and short responses (e.g. a small model like gpt-5-mini responds to a "hello" very quickly).

When this occurs, resizing the terminal can force the re-render of the response which will then appear correctly

Version affected

c077938 on main branch

How To Reproduce
run cagent run agent.yaml with a small model and send it something short like "Hello"

agent.yaml

version: "2"
agents:
  root:
    model: openai/gpt-5-mini
    instruction: you are a helpful assistant

Expectation

Response always renders correctly

OS and Terminal type

Reproduced on MacOS 26 and Ubuntu 25.10 with vscode and ghostty


Screenshots

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/tuiFor features/issues/fixes related to the TUIkind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions