Message enqueuing + steering for Claude and Ada (unify with Codex)#115
Open
germanescobar wants to merge 2 commits into
Open
Message enqueuing + steering for Claude and Ada (unify with Codex)#115germanescobar wants to merge 2 commits into
germanescobar wants to merge 2 commits into
Conversation
Bring Codex's enqueue + steer model to Claude and Ada with a unified keymap. While a run is streaming: - Enter enqueues the message for the next run. - Shift+Enter steers: Codex uses native turn/steer; Claude/Ada stop the run and resume with the steer text only. The composer is disabled during the stop->resume transition to avoid a race. With an empty composer, Shift+Enter promotes the first enqueued message to a steer. The queue is persisted server-side per session under ~/coding-orchestrator/queues/<sessionId>.json and drains one-at-a-time on clean completion. Advancement is server-driven: the stream handler can run headlessly, so the queue advances even when no client is connected (other session, reload, or app closed). Failures/cancellations leave the queue intact. A visible list above the composer shows queued messages with a remove action. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
# Conflicts: # server/routes/sessions.ts
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.
Closes #113.
Brings Codex's enqueue + steer model to Claude and Ada with a unified keymap across all three agents.
Behavior
While a run is streaming:
EnterShift+EnterWhen idle,
Entersends andShift+Enteris a newline (unchanged).turn/steer. Claude/Ada have no native steer, so they stop the run and resume with the steer text only. The composer is disabled during the stop→resume transition to avoid a race.~/coding-orchestrator/queues/<sessionId>.json, drained one-at-a-time on clean completion. Failures/cancellations leave the queue intact.Implementation
server/lib/session-queue.ts— per-session queue persistence (enqueue/list/remove/dequeueFirst/clearQueue) with per-session locking;paths.tshelpers.server/routes/sessions.ts— queue CRUD routes;handleSessionStreamextracted and invoked headlessly byadvanceSessionQueueon clean completion (both CLI and Codex app-server paths); queue cleared on archive.client/src/api.ts— queue API client.client/src/pages/SessionView.tsx— unified keymap, enqueue/steer handlers (native + emulated), queue list UI, server-driven run observation.Testing
server/lib/__tests__/session-queue.test.ts— 7 unit tests (ordering, dequeue, remove, isolation, clear, concurrency).tsc --noEmitclean.🤖 Generated with Claude Code