You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: have a queue up mode so the messages are not default to interrupt at the next tool call. #1881
currently the messages default interrupt the ongoing task. In the case when the ask is different from the ongoing tasks, it may distract or misdirect the agent to abandon current work.
Proposed solution
similar to the way codex queue up messages.
Sometimes I don't want the messages to interrupt the work on going, I just want to queue up additional tasks so that they get picked up at the end of the ongoing tasks. This also enables the session to run longer.
Triage update (2026-05-29): I inspected #1881 against current origin/main and do not see a safe tiny implementation slice yet. The requested behavior is not just a UI toggle; it needs a send-mode contract and a durable queue tied to agent/session state.
Evidence from origin/main:
src/main/runtime/orca-runtime.ts and src/main/runtime/rpc/methods/terminal.ts: terminal.send accepts text / enter / interrupt, writes bytes directly to the PTY, and returns only accepted/bytes-written metadata. There is no queued mode or deferred-delivery result.
src/cli/handlers/terminal.ts: orca terminal send exposes --interrupt, but no queue/defer mode.
src/renderer/src/runtime/runtime-terminal-inspection.ts: local and remote PTY input is sent immediately; the remote path also goes through terminal.send.
src/renderer/src/lib/new-workspace.ts: the legacy followupPrompt path waits for an agent foreground process and then sends ${prompt}\r; that is startup delivery, not “deliver after the current task finishes.”
src/renderer/src/lib/agent-paste-draft.ts and src/renderer/src/lib/launch-agent-in-new-tab.ts: draft / submit-after-ready paths use bracketed paste or native prefill for startup/new-session prompts, not queued follow-ups to an already-running agent.
src/renderer/src/store/slices/terminals.ts: pendingStartupByTabId, pendingSetupSplitByTabId, and pendingIssueCommandSplitByTabId are one-shot in-memory startup maps, and they are not part of WorkspaceSessionState in src/shared/types.ts.
src/shared/tui-agent-config.ts and src/shared/tui-agent-startup.ts: prompt injection is provider-specific (argv, prompt flags, interactive flags, stdin-after-start, native prefill env/flags), so queued delivery cannot be one generic paste path without a provider contract.
src/main/runtime/orchestration/db.ts: there is a persistent queue-like store for orchestration messages, but that is inter-agent/coordinator messaging, not user prompt delivery to terminal-backed agents.
Before implementation, this needs these contracts:
Send mode: define “send now / interrupt” vs “queue” semantics, default behavior, CLI/API names, and whether queued items become normal user turns.
UI command: decide where the mode lives across desktop composer, terminal actions, mobile, and CLI; define visible queue count/state, shortcut behavior, and copy for “queued” vs “sent.”
Queue storage: define a durable schema keyed by worktree, tab, pane key / PTY / session, agent/provider, order, timestamps, and delivery attempts; also define restart, closed-tab, and max-size behavior.
Delivery-on-idle: decide which signal releases the next message, such as hook state (done, waiting, blocked), tui-idle, or provider-specific idle markers, and how to avoid sending into permission prompts or tool calls.
Cancellation/editing: define edit/delete/reorder rules before delivery, delivered vs pending states, and behavior when the terminal, agent, worktree, or SSH session exits.
Provider / SSH / remote: define parity for local terminals, SSH terminals, remote runtimes, and mobile floor ownership; provider-specific delivery may need native queue support, bracketed paste, or an explicitly degraded fallback.
Suggested first bounded issue: add a typed AgentPromptQueue contract with tests for enqueue / dequeue / cancel / serialize, without UI or PTY writes. A second slice can wire delivery to one provider/session class after the idle and delivery semantics are approved.
Data point from driving Claude Code through Orca, in case it helps scope this.
Orca's default send is already non-interrupting — terminal.send/sendTerminalAgentPrompt bracketed-pastes the text, sanitizes ESC to an inert literal, then writes a single \r. Verified with a live probe: sending mid-turn to Claude Code 2.1.251 leaves the running turn alone and the message is queued by the CLI itself.
What is missing is the guarantee and the observability: the CLI has no way to say "deliver only when the target is idle" (only the desktop notes path does terminal.wait for: tui-idle), and no way to say "queue this, never interrupt". For multi-agent setups where executors report back into a lead session with orca terminal send --text … --enter, that guarantee is the whole ballgame — the blast radius on the Claude Code side is severe: a single interrupt gesture while the lead is idle waiting on background subagents terminates all of them at once, irreversibly (system/agents_killed, "N background agents were stopped by the user"). Minutes of work, gone, no undo.
Concretely, what would make this safe for CLI-driven fan-in:
orca terminal send --queue (or --send-mode queue|immediate|when-idle): buffer in Orca, deliver at the next observed idle boundary, never write mid-turn.
Durable queue with an explicit outcome in --json (queued / delivered / dropped), so the sender can wait on it instead of polling terminal read.
Same contract for the desktop composer, so the UI and CLI cannot disagree.
Implemented in PR #36588 (0d94c0ba8f6e39f950c7ab032403d0fe6203b9c6), which makes queueing follow-up messages the default in native chat (src/shared/native-chat/input/composer/native-chat-follow-up-behavior.ts, ChatBehaviorSetting.tsx, use-structured-agent-session.ts), while terminal agent sends were already non-interrupting.
Activity
nwparker commentedon May 29, 2026
Triage update (2026-05-29): I inspected #1881 against current
origin/mainand do not see a safe tiny implementation slice yet. The requested behavior is not just a UI toggle; it needs a send-mode contract and a durable queue tied to agent/session state.Evidence from
origin/main:src/main/runtime/orca-runtime.tsandsrc/main/runtime/rpc/methods/terminal.ts:terminal.sendacceptstext/enter/interrupt, writes bytes directly to the PTY, and returns only accepted/bytes-written metadata. There is no queued mode or deferred-delivery result.src/cli/handlers/terminal.ts:orca terminal sendexposes--interrupt, but no queue/defer mode.src/renderer/src/runtime/runtime-terminal-inspection.ts: local and remote PTY input is sent immediately; the remote path also goes throughterminal.send.src/renderer/src/lib/new-workspace.ts: the legacyfollowupPromptpath waits for an agent foreground process and then sends${prompt}\r; that is startup delivery, not “deliver after the current task finishes.”src/renderer/src/lib/agent-paste-draft.tsandsrc/renderer/src/lib/launch-agent-in-new-tab.ts: draft / submit-after-ready paths use bracketed paste or native prefill for startup/new-session prompts, not queued follow-ups to an already-running agent.src/renderer/src/store/slices/terminals.ts:pendingStartupByTabId,pendingSetupSplitByTabId, andpendingIssueCommandSplitByTabIdare one-shot in-memory startup maps, and they are not part ofWorkspaceSessionStateinsrc/shared/types.ts.src/shared/tui-agent-config.tsandsrc/shared/tui-agent-startup.ts: prompt injection is provider-specific (argv, prompt flags, interactive flags,stdin-after-start, native prefill env/flags), so queued delivery cannot be one generic paste path without a provider contract.src/main/runtime/orchestration/db.ts: there is a persistent queue-like store for orchestration messages, but that is inter-agent/coordinator messaging, not user prompt delivery to terminal-backed agents.Before implementation, this needs these contracts:
done,waiting,blocked),tui-idle, or provider-specific idle markers, and how to avoid sending into permission prompts or tool calls.Suggested first bounded issue: add a typed
AgentPromptQueuecontract with tests for enqueue / dequeue / cancel / serialize, without UI or PTY writes. A second slice can wire delivery to one provider/session class after the idle and delivery semantics are approved.Jinwoo-H commentedon May 30, 2026
I agree this would be helpful
smixs commentedon Aug 31, 2026
Data point from driving Claude Code through Orca, in case it helps scope this.
Orca's default send is already non-interrupting —
terminal.send/sendTerminalAgentPromptbracketed-pastes the text, sanitizesESCto an inert literal, then writes a single\r. Verified with a live probe: sending mid-turn to Claude Code 2.1.251 leaves the running turn alone and the message is queued by the CLI itself.What is missing is the guarantee and the observability: the CLI has no way to say "deliver only when the target is idle" (only the desktop notes path does
terminal.wait for: tui-idle), and no way to say "queue this, never interrupt". For multi-agent setups where executors report back into a lead session withorca terminal send --text … --enter, that guarantee is the whole ballgame — the blast radius on the Claude Code side is severe: a single interrupt gesture while the lead is idle waiting on background subagents terminates all of them at once, irreversibly (system/agents_killed, "N background agents were stopped by the user"). Minutes of work, gone, no undo.Concretely, what would make this safe for CLI-driven fan-in:
orca terminal send --queue(or--send-mode queue|immediate|when-idle): buffer in Orca, deliver at the next observed idle boundary, never write mid-turn.--json(queued/delivered/dropped), so the sender can wait on it instead of pollingterminal read.nwparker commentedon Dec 1, 2026
Implemented in PR #36588 (
0d94c0ba8f6e39f950c7ab032403d0fe6203b9c6), which makes queueing follow-up messages the default in native chat (src/shared/native-chat/input/composer/native-chat-follow-up-behavior.ts,ChatBehaviorSetting.tsx,use-structured-agent-session.ts), while terminal agent sends were already non-interrupting.