Skip to content

Agents: the "finished without a text answer" UI placeholder is persisted and replayed to the model as the agent's own turn (follow-up to #517) #533

Description

@juanlentino

Split from #517 per maintainer request (#517 (comment)).

Problem

When an agent run fails to produce answer text, the chat UI renders the placeholder "The agent finished without a text answer." — and that placeholder string is persisted as the agent's conversation turn. Every subsequent run in that conversation replays it to the model as something the agent actually said. Captured from a live composed prompt:

Conversation so far, oldest first:
User: Propose a revision to post 1716 …
You: The agent finished without a text answer.
User: Try again
You: The agent finished without a text answer.

Effects

  • The model is told it previously "answered" with a meta-sentence about UI state, which it may imitate, apologize for, or reason about — context pollution that compounds with every failed run in the thread.
  • Once AI: surface an empty final answer as an error instead of a silent success #530 lands (empty answers become errors), the equivalent question becomes how error turns are persisted/replayed — probably as nothing, or as a clearly-marked system note rather than an agent utterance.

Suggested direction

Persist failure turns as a distinct row type (or not at all) so the prompt composer either skips them or renders them as bracketed system context, never as You: <ui placeholder>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions