feat(queue): add live steer and follow-up session input queues - #1105
Draft
Fodesu wants to merge 5 commits into
Draft
feat(queue): add live steer and follow-up session input queues#1105Fodesu wants to merge 5 commits into
Fodesu wants to merge 5 commits into
Conversation
Fodesu
force-pushed
the
codex/steer-followup-queue-20260827
branch
from
August 29, 2026 19:35
2384cc1 to
8982893
Compare
Fodesu
marked this pull request as ready for review
August 30, 2026 05:34
chen-ran
force-pushed
the
codex/steer-followup-queue-20260827
branch
from
August 31, 2026 04:21
619c0ea to
26092c5
Compare
Fodesu
marked this pull request as draft
September 1, 2026 12:50
Fodesu
force-pushed
the
codex/steer-followup-queue-20260827
branch
2 times, most recently
from
September 2, 2026 17:41
d0d7983 to
9179aa6
Compare
Fodesu
marked this pull request as ready for review
September 2, 2026 18:26
Fodesu
force-pushed
the
codex/steer-followup-queue-20260827
branch
2 times, most recently
from
September 3, 2026 12:30
94d90bf to
dd6087c
Compare
chen-ran
marked this pull request as draft
September 4, 2026 18:23
Steer and follow-up queues for a session's active run, kept in the configured session runtime backend (memory or Redis) rather than PostgreSQL. - Separate steer and follow-up Go types, runtime methods, and Redis keys, with accepted/claimed/applied/canceled lifecycle, reorder, edit, cancel, promote, and invocation replay. - Steer claims are fenced to the active run's owner, generation, and fencing token and consumed at the step commit barrier; a final step that finds no steer seals the run. - Follow-ups are claimed at the run's terminal boundary and started through ordinary turn admission. - HTTP queue routes, channel /steer and /queue slash commands, split-runtime RPC, web queue panel, and live steer projection in the session runtime. Squashed from the PostgreSQL-backed iterations of this branch. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Fodesu
force-pushed
the
codex/steer-followup-queue-20260827
branch
from
September 7, 2026 10:26
dd6087c to
e3f9bb4
Compare
…urns into follow-ups - Reject a run's accepted and claimed steers when the run reaches a terminal state and seal the run against late admission (CloseSteerRun). - Skip steer claims on deferred-decision steps; the continuation's first committed step claims instead. Advance an existing unapplied claim to the run's current owner, generation, and fencing token on reclaim. - Store busy-session turns in the follow-up queue with the full StartTurnCommand so continuations keep channel routing, reply targets, and attachments. Remove the separate DeferredTurnBackend. Start follow-ups with one in-flight starter per session and kick a start when the enqueue observed a run that has already ended. - Bound each queue to 64 pending items (queue_capacity_exceeded) and compact terminal items to the newest 64 after every mutation. - Watch only the queue document and run key in Redis queue transactions; the session state key is rewritten on every streamed delta and is now read but not watched. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…sactions Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
publicAgentStreamEvent replaces a native error event's detail with a stable code before the event leaves the application, and continueRuntimeDecision derives its failure cause from that public event. A failed ask_user or tool approval continuation therefore logged only agent.response_interrupted. Record the original event text in the continuation loops before the conversion. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ing by timestamp applyRuntimeTranscript re-sorted the whole transcript whenever a runtime frame carried a user turn with turn_position. sortChatMessages falls back to timestamps when the other side has no position, and a live assistant turn never has one. Once the first step commit persisted the request user, the frame replaced it with the stored row whose timestamp is the commit time, later than the assistant turn that had already started streaming, so the reply rendered above its own request. The runtime projection already orders a run's turns (request users, then assistant segments split around each steer). Insert that block as delivered. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Fodesu
force-pushed
the
codex/steer-followup-queue-20260827
branch
from
September 7, 2026 10:56
e3f9bb4 to
af56c8a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
memoryorredis). They are live coordination state, deliberately not part of the PostgreSQL durable model.StartTurnCommand; platform channels keep the bounded busy retry because their reply is delivered from the caller's run handle./now,/btw,/nextchannel paths; add/steerand/queueslash commands, REST queue endpoints, split-runtime RPC, and a composer queue panel with edit, reorder, delete, and follow-up-to-steer promotion./steerworks on every channel because it joins the run the channel is already streaming;/queueis accepted only on local channels (web, cli) and platform channels getqueue_follow_up_unsupported_channel, since they could not receive the reply of a run the server starts from the queue.Architecture
queue_capacity_exceeded) and the newest 64 terminal items. Invocation IDs give best-effort replay protection within that retention.Design notes:
docs/design/session-input-queues.md.Deliberate deviations from the original spec
Also in this PR
Validation
go build ./...,go vet ./...,golangci-lint run ./..., andgo test ./...pass.MEMOH_TEST_REDIS_URL) passes against a local Redis across two backend instances.pnpm lintand the UI contract guard pass;apps/web/src/storeVitest suites pass.pnpm vitest runreports 5 failures in desktop/media-gallery/dockview tests andpnpm -C apps/web typecheckfails inbot-selectandconfig-schema-form; those files are identical tomainand fail there in the same environment.Known issue outside this PR
Answering an ask_user question on
deepseek-v4-flashcan fail withThe reasoning_content in the thinking mode must be passed back to the API. The continuation replays stored history and DeepSeek rejects assistant tool-call messages withoutreasoning_content. This is independent of the queue changes and is being fixed in Twilight's completions provider.