"Queue" doesn't work well enough. #235
Loading…
Reference in a new issue
No description provided.
Delete branch "osf/99-queue-doesn-t-work-well-enough"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 fordelivery: "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.mdrecords 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:
queuedelivery with a better chip or timeout.steer. The server addssteerbesidequeueandredirect.queuestays and still means delivery after the turn, so older clients and recorded history keep working. The console sendssteerwhile the agent is working andqueuewhen it is not (idle, orawaiting_question), where nothing is running to wait for and nothing may be aborted. Ruled out: changing whatqueuemeans.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 asteermode besidequeue; the help text, heights and layout requirements name Send and Redirect.Impact
ui/src/components/Composer.tsx,ui/src/lib/api.ts,ui/src/lib/repair.ts,ui/src/lib/delivered.ts,ui/e2e/composer.spec.tsand vitest files.src/osf/api/routes.pyandsrc/osf/api/repair.pyaccept thesteermode;src/osf/events.py,src/osf/format.py,src/osf/engine/executors.py,src/osf/engine/recovery.pyandsrc/osf/engine/repair.pydeliver it withdelivery: steer; thequeuepath is unchanged. Unit tests for both.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-s1djhjhave a tagged test. No test carries thespec:tag of these:composer/LeaveThe test lint found, in the run's tests on the last check:
Recorded, not decided
ui/e2e/composer-controls.ts:1B7: nothing imported here looks like the module under test ('composer-controls')Braid run
queue-doesn-t-work-well-enough-i-just-te-s1djhjOpened by Braid.
e43d6031abf9c3a8df98f9c3a8df986748115fab6748115faba6b3bdbbb4Pull request closed