Repository navigation
[feature] Inspect, edit, and cancel queued chat and shell commands #284
Description
Activity
Closed by #315 — squash commit
52a890conmain.main's tree is byte-identical to the CI-verified heade9af312(git diff 52a890c e9af312is empty).What landed
-
src/commands/console_queue.tsaddsConsoleQueue. It gives entries session-stable ids (q1,q2, … never reused), keeps strict FIFO order, and enforces a 32-entry / 64 KiB (UTF-8) bound. -
New commands:
/queue [list],/queue edit <id> <text>,/queue remove <id>,/queue clear,/queue resume.- They work mid-stream and while a model switch is pending.
- They never call a model, never start a process, and never enter history.
-
Each entry is labelled
chat,user shell,shell reset,shell profileorshell-share. The running entry is listed separately and cannot be edited. -
Shell-share binding: a queued
/shell-result sendbinds to the reviewed preview's command id. If that preview was cancelled or replaced, it refuses and sends nothing. With nothing staged, it is not queued. Other share actions show "stages the latest shell result at execution". -
Dispositions, each listing the exact ids affected:
Event Pending entries Chat failure (incl. 401) Paused until /queue resumeCtrl+C, shell state loss, /shell-reset, profile change,/auth new, exitDiscarded Nothing resumes silently. Before this change, a failed turn's queue drained after the next submit.
-
Line mode (non-TTY) has no pending queue, and
/queue <task>runs as the next line. This is documented indocs/LOCAL_SHELL_SESSION.md→ "Queued input".
Acceptance → evidence
Criterion Test Inspect/edit/remove/clear during an active turn without disrupting it or the draft TTY: list, edit and remove mixed queued entries while a turn streams…Removed shell → 0 process calls; removed chat → 0 model calls same test: the marker file is never created, and fetch bodies = 2 (q1 + edited q2) Edits keep position/type; invalid edits rejected unchanged edits keep id, position and type…(unit) + TTY chat→shell / shell→chat / running-entry rejectionsFailure / cancellation / exit show exactly what remains or was discarded; no silent resume TTY: a failed turn pauses…,TTY: cancelling a streaming turn discards…,TTY: leaving the console with held entries…Shell-share binding a queued shell-share send only sends the preview it was bound toBounds + feedback bounds reject with useful feedback…Non-TTY documented and tested line mode has no pending queue…CI and local runs
- Self-hosted Linux CI, run 37535843906 (
aether-agent-vps6-01): 3408 tests, 3392 pass, 1 fail, 15 skipped.- All 13 queue tests pass, as does the Linux-only
raw TTY queues shell while a model turn is busy…. - The one failure is a pre-existing
maindefect:production verifier…rejects a README/refreshexample. This PR does not touch README or scripts. feat(chat): deliver /steer to the active turn with an honest acknowledgement (#283) #314 merged with the same red step.
- All 13 queue tests pass, as does the Linux-only
- Other red steps are by design or pre-existing:
Require artifact uploadsfails because of the artifact quota ([bug] Restore required Agent CI after billing and artifact quota failures #267).supply-chain › Verify production package and policyfails on the same README defect.- CodeQL
Analyzepassed; only its artifact-upload step is red. - The failure set matches feat(chat): deliver /steer to the active turn with an honest acknowledgement (#283) #314's landed run.
- Windows CI: the job stayed queued because
aether-aws-windows-agent-01is offline. - Local Windows 10 run (Node 24.18):
- Full suite: 3336 pass. One source-shape test was updated in
e9af312. - Two
device_runtimeJob Object tests fail with warden ping timeouts. This branch has no diff undersrc/core/device_runtime, and one of the two passes on rerun. - Console/queue/shell/steer subset after the rebase onto feat(chat): deliver /steer to the active turn with an honest acknowledgement (#283) #314: 104 pass, 0 fail.
docs:checkis clean.
- Full suite: 3336 pass. One source-shape test was updated in
Follow-ups not covered here:
- Re-check Windows on the next
mainbuild once the runner is back. - Draft Inspect, edit and discard bounded typed pending console entries #311 was a parallel implementation of this issue and now conflicts with
main.
-
AetherAI3 commented
on Oct 6, 2026 OwnerAuthorMore actionsPost-merge verification of main
52a890c5291383dda22593bcf35a600fd9fc3251found residual acceptance gaps despite #315's successful feature landing: malformed pasted ID-based queue controls could become ordinary chat; command-ID-only shell-share binding permitted changes to the reviewed bytes; and shell generation reset did not consistently invalidate pending work. #309 now contains a narrowly reconciled fix preserving #315's queue design, PowerShell profiles and steering. It also restores an edited attachment draft exactly when a full queue rejects admission.Synthetic regression evidence: 60 focused tests passed, 4 platform skips, including real busy-TTY wire/history checks and zero-process stale-queue replay checks. Full suite: 3,409 passed, 15 skipped, one independently reproduced README/command-manifest baseline failure. Required CI/admin and baseline gates remain unresolved, so the current issue closure should not be used as proof these follow-up fixes have landed. Superseded duplicate PR #311 is closed without merge; #309 is the remaining follow-up.
Problem
Users can type ahead or
/queuewhile a turn runs, but the queue only emits a short echo and later drains. There is no way to inspect the whole queue, remove a mistaken command, or see whether a failed turn left items pending.Evidence: src/commands/chat.ts, src/commands/chat.ts, and src/commands/chat.ts. Existing queueing landed in PR #9; this is management of that queue.
Proposed outcome
Give pending entries stable local IDs and explicit list/edit/remove/clear operations. Show each entry as chat, user shell, or shell-share action. Display pending count and disposition after a task failure or cancellation.
Constraints and alternatives
Keep queue operations local and responsive during an active turn; they do not invoke a model. Preserve strict ordering and distinguish the running entry from editable pending entries. An explicit shell command remains the user's local action and never becomes model context just because it was queued.
Define shell-share binding visibly: if “latest at execution” is used, say so; a staged preview from #281 must remain bound to its reviewed command. Keep queued shell text out of ordinary chat history/exports. Set an explicit queue size/byte bound with useful feedback.
Acceptance
Priority: P2. Small control feature building on #244. Source reviewed at
ca4180d(0.4.0 candidate). This ticket is an implementation spec; live service qualification remains separate.