Skip to content

fix(agents): stabilize queue, steer, and timeline ordering - #153

Draft
yoloyash wants to merge 4 commits into
feat/connector-agent-daemonfrom
feat/agent-queue-steer
Draft

fix(agents): stabilize queue, steer, and timeline ordering#153
yoloyash wants to merge 4 commits into
feat/connector-agent-daemonfrom
feat/agent-queue-steer

Conversation

@yoloyash

@yoloyash yoloyash commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • keep the agent composer visually stable while a turn is active: Enter and the unchanged send button queue the draft instead of exposing a separate delivery-mode toolbar
  • render connector-owned queued messages directly above the composer with Edit, Steer, and Delete actions; editing restores text and images to the same composer
  • make queued-message promotion the only steering path in protocol v1, removing direct draft-level Steer, Interrupt, and interrupt-queued commands instead of retaining parallel or compatibility paths
  • keep durable FIFO queue ownership, command deduplication, and provider transitions in the Host Connector for Codex, Pi, and OMP
  • make the Codex adapter emit one authoritative ordered projection for each turn; connector and browser reducers replace that turn atomically instead of deriving order from event arrival timing
  • anchor synthetic prompt and steer inputs to their native Codex item boundary, then reconcile late native user echoes without changing logical order or stable client identity

Interaction model

While a provider is working, every ordinary composer submission first becomes a visible queued item. The user can then:

  • Edit — remove the item from the connector queue and restore its text/images to the unchanged composer
  • Steer — promote the selected queued item into the active native provider turn
  • Delete — remove it from the connector queue

Stop remains a separate active-turn control. There is no hidden Command/Ctrl+Enter steering mode; alternate Enter combinations queue as well. When the provider is idle, ordinary composer submissions start a prompt normally. Slash commands continue to normalize into their provider-neutral commands before delivery.

Root cause fixed

The reported order corruption was real and survived reload because the connector runtime snapshot itself was already wrong:

  1. Codex can omit live user-item notifications. The adapter synthesized those inputs but appended them after assistant/tool items that had already arrived.
  2. The connector and browser then independently upserted each projected row, preserving its first-seen array position. A later corrected projection could update content but could not restore order.

This change gives the Codex provider projection sole ownership of order within a turn. The connector stores that ordered turn block and the browser applies the same block atomically. The exact regression covers user prompt → assistant output → mid-turn steer → assistant output → footer, including the connector snapshot used after reconnect/reload.

Paseo alignment

The interaction and timeline model was audited against getpaseo/paseo@334bf623709d91b9b9d5217fb17acc289ed16622.

Paseo keeps canonical timeline ordering in its daemon and renders queued messages above a stable composer. Its queue-mode setting makes active-run submissions queue first, although its factory setting currently defaults to Interrupt and its queue rows expose Edit and Send Now. OvertChat adopts the stable composer and visible queue-track interaction while keeping the queue in the Host Connector rather than Paseo's app-side session store, so queue state survives browser reconnects and is shared across clients.

Provider behavior

  • Codex: queued items promote through native turn/steer; authoritative ordered turn projection
  • Pi and OMP: queued items promote through their native RPC steer
  • all providers: connector-owned queue/edit/delete, FIFO drain, stable client message IDs, and command journaling

Verification

  • npm run typecheck
  • npm run lint
  • npm run test — 511 passing, 4 opt-in integration tests skipped
  • npm run build
  • E2E_PORT=4729 npm run test:e2e -w apps/web -- e2e/agent-runtime.spec.ts
  • git diff --check

Focused coverage includes provider-neutral queue promotion for Pi/OMP, Codex live projection order, connector snapshot order after a steer race, browser atomic reconciliation, provider acknowledgement after transport rejection, and rejection of delivery commands that bypass the queue. The Playwright flow covers the stable composer, default Enter-to-queue, image-preserving edit, queued Steer, Delete, modifier-key queueing, double-submit prevention, and Stop.

Stack

Stacked on #152. Merge #152 first, merge main into this branch after the parent squash so the diff stays clean, then squash-merge this PR.

@yoloyash yoloyash changed the title fix(web): stabilize agent queue and steering fix(agents): stabilize queue, steer, and timeline ordering Aug 11, 2026
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