Skip to content

view: steered inputs render at send time, not when the runtime takes them; consecutive assistant messages merge #82

Closed

Description

@xxchan

What happens

Codex (gpt-6-sol, app-server). The user prompts sleep 100, then steers three times while the agent waits:

Record order in the log (abridged):

seq record what
498 request prompt sleep 100
518 frame item/completed agentMessage "好,我等 100 秒。"
521 request steer test 1
526 frame item/started userMessage → user_message{inputId, evidence:"turn_item"} Codex reads test 1
529 request steer test 2
533 request steer test 3
536–562 agentMessage deltas reply to test 1
567, 569 user_message{inputId, evidence:"turn_item"} ×2 Codex reads test 2, test 3 (4 s after they were sent)
573–594 agentMessage deltas reply to test 2 and 3

viewOf gives:

input  sleep 100
turn   好,我等 100 秒。
input  test 1
input  test 2
input  test 3
turn   收到“test 1”。…剩余时间。收到“test 2”和“test 3”。…

The order the agent actually saw is: test 1 → reply → test 2, test 3 → reply.

Two separate problems:

  1. A steer is placed where it was sent, not where the runtime took it. upsertInput appends the input (and seals the turn) on the steer request; the later user_message observation only updates the input in place. With Codex, a steer sent mid-step waits until the step ends, so the agent's reply to an earlier steer lands after inputs it has not read yet.
  2. Two assistant messages fold into one text part. text_delta carries no message identity, so the foldEvent text case appends to the previous text part. The two Codex agentMessage items (different itemIds) render as one run-on paragraph. Between them Codex had sleep items, which produce no events. So nothing separates the two texts either.

Suggestion

  1. Place a steered input at its first user_message observation when the runtime gives one: seal the open segment there, not at the request. Until then, expose it as not yet taken (e.g. view.pendingInputs, or state: "accepted" with no observation and no position). That way an app can show it above the composer. Runtimes without read evidence keep today's request-position behaviour, which is the best known fact.
  2. Give text_delta (or a message-start event) the native message id, so the view starts a new text part per assistant message. Also consider mapping Codex sleep items (wait/resume) to an event, so a UI can show "waited 50 s" instead of nothing.

rowrow reached the same product rule independently: a steer stays in a tray until the agent reads it, then enters the conversation. So a shared fold in oar seems right.

Activity

  1. added a commit that references this issue on Oct 3, 2026
    9df2289
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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