Skip to content

[Fix] Task messages appear delivered before their turn starts - #1440

Merged
daniel-lxs merged 2 commits into
developfrom
fix/persist-queued-task-messages-2x21s4jvtm630
Aug 17, 2026
Merged

[Fix] Task messages appear delivered before their turn starts#1440
daniel-lxs merged 2 commits into
developfrom
fix/persist-queued-task-messages-2x21s4jvtm630

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

​Opened on behalf of @daniel-lxs. Follow up by mentioning @roomote-roomote or in the web UI.

What changed

  • Persist task queue lifecycle updates through the same runtime envelope path used for delivered prompts.
  • Use the runtime's allocated monotonic timestamp for every queue update so same-millisecond mutations cannot overwrite one another.
  • Keep queued messages out of the transcript until the harness emits the corresponding user_prompt at a turn boundary or during explicit steering.
  • Add regression coverage for ordinary queued messages, automatic delivery after the active turn, explicit steering of a queued message, and history hydration from persisted queue state.

Why this change was made

PR #1349 made task-message steering explicit, but the existing queue updates were live-socket-only while delivered prompts were persisted. After reconnecting or hydrating history, the UI had no durable queued state and could only reconstruct delivered transcript events, collapsing the distinction between accepted and injected messages.

Impact

Non-steering messages remain visibly queued until the harness actually starts their model turn, including after rapid queue mutations and history reloads. Automatic turn-boundary delivery and explicit steering both clear the persisted queue state and add the message to chat history only when the delivered user_prompt is emitted. Existing native steering and fallback replay behavior are unchanged.

@roomote-community

roomote-community Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

No new code issues found. See task

  • Queue-update timestamps can collide, allowing a stale queue snapshot to overwrite durable history.

Reviewed 93211d7

@daniel-lxs
daniel-lxs marked this pull request as ready for review August 17, 2026 23:24
@daniel-lxs
daniel-lxs merged commit 073ce9a into develop Aug 17, 2026
17 checks passed
@daniel-lxs
daniel-lxs deleted the fix/persist-queued-task-messages-2x21s4jvtm630 branch August 17, 2026 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant