"Queue" doesn't work well enough. #235

Closed
cmoriarty wants to merge 4 commits from osf/99-queue-doesn-t-work-well-enough into main
Owner

Braid opened this pull request so the project's CI can check the change while the run's checks go on; its description is replaced when they pass.

Proposal

Why

The composer's Queue button says "queued - delivered after this turn" and then sits there for as long as the agent's turn runs, which can be minutes. A message typed to an agent needs to be seen at once, so Queue is not useful, while Redirect works well. Source: cmoriarty/braid#233.

What Changes

Braid runs on opencode v2, and v2 does offer a faster delivery. Its prompt body takes delivery: "steer", which adds the message to the turn in flight at the agent's next step boundary (after the tool call or model step it is in), without stopping the turn. Braid has always asked for delivery: "queue" (braid#171), which waits for the whole turn. So Queue is slow by choice, and the fix is to deliver by steer, not to remove it. (docs/design/research/opencode-api.md records that steers and queues were both accepted while a session was busy or blocked, and that a steer is promoted at the next step boundary. Nobody has timed it in Braid; task 4.3 does.)

Calls made while exploring, open to overruling here:

  • The non-destructive send now delivers by steer. The message reaches the agent at its next step, usually seconds, and the turn goes on. Ruled out: removing it (the earlier draft of this change), and keeping queue delivery with a better chip or timeout.
  • The button is named "Send", not "Queue". While the agent works the box offers Stop (Esc), Send (⏎) and Redirect (⌘⏎/Ctrl+⏎); while it is idle, Send only. Redirect stays as it is: it stops the turn first, for when the agent must not finish what it is doing. Ruled out: one button that always stops the turn.
  • A new API mode steer. The server adds steer beside queue and redirect. queue stays and still means delivery after the turn, so older clients and recorded history keep working. The console sends steer while the agent is working and queue when it is not (idle, or awaiting_question), where nothing is running to wait for and nothing may be aborted. Ruled out: changing what queue means.
  • Repair's message box changes the same way, so both boxes behave alike: Send steers, Redirect stops and sends.
  • The chip changes. A steered message shows a chip that says it will be read at the agent's next step, not "queued - delivered after this turn". The help tooltip, the docs and the tests that mention Queue are updated to match.
  • Stop and Esc stay.

Capabilities

New Capabilities

Modified Capabilities

  • composer: Queue is replaced by Send, which delivers by steer into the turn in flight; Redirect stays; the same for Repair; the server accepts a steer mode beside queue; the help text, heights and layout requirements name Send and Redirect.

Impact

  • UI: ui/src/components/Composer.tsx, ui/src/lib/api.ts, ui/src/lib/repair.ts, ui/src/lib/delivered.ts, ui/e2e/composer.spec.ts and vitest files.
  • Backend: src/osf/api/routes.py and src/osf/api/repair.py accept the steer mode; src/osf/events.py, src/osf/format.py, src/osf/engine/executors.py, src/osf/engine/recovery.py and src/osf/engine/repair.py deliver it with delivery: steer; the queue path is unchanged. Unit tests for both.
  • Docs: docs/guide.md, docs/design/braid.md (§14), docs/design/panes.md, ui/README.md.

Code review

Reviewed the steer mode across API, executor, Repair, recovery, event formatting, the composer UI, docs and tests. Found no stray artifacts or bugs and made no changes. Backend unit tests (-k steer/queue/repair/prompt) and ui tsc plus vitest src/lib pass.

It found nothing to fix.

Tests

35 of 36 scenarios of queue-doesn-t-work-well-enough-i-just-te-s1djhj have a tagged test. No test carries the spec: tag of these:

  • composer/Leave

The test lint found, in the run's tests on the last check:

Recorded, not decided

  • ui/e2e/composer-controls.ts:1 B7: nothing imported here looks like the module under test ('composer-controls')

Braid run

  • Workflow: Braid's OpenSpec flow, change queue-doesn-t-work-well-enough-i-just-te-s1djhj
  • Issue: cmoriarty/braid#233
  • Pre-flight estimate: fits, p50 213k / p80 312k tokens against a 962k-token step allowance
  • CI: no CI ran on the checked code: the local lanes failed, so CI was not asked; what only CI tests went unverified

Opened by Braid.

Braid opened this pull request so the project's CI can check the change while the run's checks go on; its description is replaced when they pass. # Proposal ## Why The composer's Queue button says "queued - delivered after this turn" and then sits there for as long as the agent's turn runs, which can be minutes. A message typed to an agent needs to be seen at once, so Queue is not useful, while Redirect works well. Source: [cmoriarty/braid#233](https://forgejo.underthere.xyz/cmoriarty/braid/issues/233). ## What Changes Braid runs on opencode v2, and v2 does offer a faster delivery. Its prompt body takes `delivery: "steer"`, which adds the message to the turn in flight at the agent's next step boundary (after the tool call or model step it is in), without stopping the turn. Braid has always asked for `delivery: "queue"` (braid#171), which waits for the whole turn. So Queue is slow by choice, and the fix is to deliver by steer, not to remove it. (`docs/design/research/opencode-api.md` records that steers and queues were both accepted while a session was busy or blocked, and that a steer is promoted at the next step boundary. Nobody has timed it in Braid; task 4.3 does.) Calls made while exploring, open to overruling here: - **The non-destructive send now delivers by steer.** The message reaches the agent at its next step, usually seconds, and the turn goes on. Ruled out: removing it (the earlier draft of this change), and keeping `queue` delivery with a better chip or timeout. - **The button is named "Send", not "Queue".** While the agent works the box offers Stop (Esc), Send (⏎) and Redirect (⌘⏎/Ctrl+⏎); while it is idle, Send only. Redirect stays as it is: it stops the turn first, for when the agent must not finish what it is doing. Ruled out: one button that always stops the turn. - **A new API mode `steer`.** The server adds `steer` beside `queue` and `redirect`. `queue` stays and still means delivery after the turn, so older clients and recorded history keep working. The console sends `steer` while the agent is working and `queue` when it is not (idle, or `awaiting_question`), where nothing is running to wait for and nothing may be aborted. Ruled out: changing what `queue` means. - **Repair's message box changes the same way**, so both boxes behave alike: Send steers, Redirect stops and sends. - **The chip changes.** A steered message shows a chip that says it will be read at the agent's next step, not "queued - delivered after this turn". The help tooltip, the docs and the tests that mention Queue are updated to match. - **Stop and Esc stay.** ## Capabilities ### New Capabilities ### Modified Capabilities - `composer`: Queue is replaced by Send, which delivers by steer into the turn in flight; Redirect stays; the same for Repair; the server accepts a `steer` mode beside `queue`; the help text, heights and layout requirements name Send and Redirect. ## Impact - UI: `ui/src/components/Composer.tsx`, `ui/src/lib/api.ts`, `ui/src/lib/repair.ts`, `ui/src/lib/delivered.ts`, `ui/e2e/composer.spec.ts` and vitest files. - Backend: `src/osf/api/routes.py` and `src/osf/api/repair.py` accept the `steer` mode; `src/osf/events.py`, `src/osf/format.py`, `src/osf/engine/executors.py`, `src/osf/engine/recovery.py` and `src/osf/engine/repair.py` deliver it with `delivery: steer`; the `queue` path is unchanged. Unit tests for both. - Docs: `docs/guide.md`, `docs/design/braid.md` (§14), `docs/design/panes.md`, `ui/README.md`. ## Code review Reviewed the steer mode across API, executor, Repair, recovery, event formatting, the composer UI, docs and tests. Found no stray artifacts or bugs and made no changes. Backend unit tests (-k steer/queue/repair/prompt) and ui tsc plus vitest src/lib pass. It found nothing to fix. ## Tests 35 of 36 scenarios of `queue-doesn-t-work-well-enough-i-just-te-s1djhj` have a tagged test. No test carries the `spec:` tag of these: - `composer/Leave` The test lint found, in the run's tests on the last check: **Recorded, not decided** - `ui/e2e/composer-controls.ts:1` B7: nothing imported here looks like the module under test ('composer-controls') ## Braid run - **Workflow:** Braid's OpenSpec flow, change `queue-doesn-t-work-well-enough-i-just-te-s1djhj` - **Issue:** cmoriarty/braid#233 - **Pre-flight estimate:** fits, p50 213k / p80 312k tokens against a 962k-token step allowance - **CI:** no CI ran on the checked code: the local lanes failed, so CI was not asked; what only CI tests went unverified _Opened by Braid._
cmoriarty force-pushed osf/99-queue-doesn-t-work-well-enough from e43d6031ab
Some checks failed
test / fast-lane (push) Failing after 3m53s
test / fast-lane (pull_request) Failing after 4m12s
to f9c3a8df98
Some checks failed
test / fast-lane (push) Failing after 4m0s
test / fast-lane (pull_request) Failing after 8m33s
2026-10-21 16:20:39 -04:00
Compare
cmoriarty force-pushed osf/99-queue-doesn-t-work-well-enough from f9c3a8df98
Some checks failed
test / fast-lane (push) Failing after 4m0s
test / fast-lane (pull_request) Failing after 8m33s
to 6748115fab
Some checks failed
test / fast-lane (pull_request) Failing after 3m18s
test / fast-lane (push) Failing after 6m44s
2026-10-21 16:41:44 -04:00
Compare
cmoriarty force-pushed osf/99-queue-doesn-t-work-well-enough from 6748115fab
Some checks failed
test / fast-lane (pull_request) Failing after 3m18s
test / fast-lane (push) Failing after 6m44s
to a6b3bdbbb4
Some checks failed
test / fast-lane (pull_request) Failing after 6m52s
test / fast-lane (push) Successful in 30m20s
2026-10-21 17:28:14 -04:00
Compare
cmoriarty closed this pull request 2026-10-21 18:26:04 -04:00
Some checks are pending
test / fast-lane (pull_request) Failing after 6m52s
test / fast-lane (push) Successful in 30m20s
test / suite (pull_request)
Required

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
cmoriarty/braid!235
No description provided.