Run /fork (and other action slash commands) immediately in queued-prompts mode
Description
When queued-prompts mode is enabled and a conversation is in progress, submitting an action-emitting slash command like /fork captured it as a queued prompt (it showed up as a literal /fork row in the queue) instead of running immediately. This is wrong: /fork doesn't add an input to the current conversation — it emits an action (forking into a new pane/tab).
Root cause: in app/src/terminal/input.rs, the Enter submit chain runs maybe_queue_input_for_in_progress_conversation before the slash-command executor, and while a conversation is in progress with queueing enabled it appended the whole buffer to the queue, special-casing only /queue.
This PR makes action-emitting slash commands bypass prompt queuing and run immediately, while keeping the prompt-submitting commands queued.
What changed
- Added a centralized classifier
slash_command_is_submitted_as_promptinslash_commands/mod.rs— the single source of truth for which slash commands reiterate their text into the conversation as an AI prompt (/compact,/plan,/orchestrate) versus emit an immediate local action (everything else). Thecommand_that_just_sends_ai_request_with_prefixarm inexecute_slash_commandnow uses it too, so the list lives in one place. maybe_queue_input_for_in_progress_conversationnow bypasses the queue for detected action-emitting slash commands (e.g./fork,/model,/rewind), letting them fall through to the slash-command executor./queuekeeps its existing dedicated handling;/compact//plan//orchestrateand skills are still queued.- Per reviewer request, the prior art in
submit_viewer_ai_query(which hardcoded/fork+/fork-and-compactto run locally on the viewer's machine instead of forwarding to the sharer) now routes through the same classifier, centralizing the "handled immediately vs reiterated as a prompt" decision.
Note on long-running commands
While an agent controls a long-running command (LRC), /fork is intentionally unavailable (gated by NO_LRC_CONTROL), so it is not detected as a command in that state and is unaffected by this change. The fix targets the normal in-progress (streaming response) state where /fork is available, which is the reported scenario.
Linked Issue
Reported in the factory-client bug-triage Slack thread (linked below). No GitHub issue.
- [x] Where appropriate, screenshots or a short video of the implementation are included below.
Testing
-
Added unit test
slash_command_is_submitted_as_prompt_only_for_prompt_commands(classifier correctness: only/compact//plan//orchestrateare prompts;/fork,/fork-and-compact,/fork-from,/continue-locally,/compact-and,/model,/rewind,/conversations,/queueare not). -
Added integration tests in
input_tests.rs:slash_fork_bypasses_prompt_queue_while_in_progress— with an in-progress conversation and queue mode on,/forkis NOT added to the queue.slash_compact_still_queues_while_in_progress—/compactis still queued, so the bypass is scoped to action commands only.
-
All three new tests pass (
cargo nextest run -p warp ...).cargo clippy -p warp --testsis clean. -
Manual verification by building and running Warp and driving it with computer use: with queue mode ON during a normal streaming response, typing
/fork+ Enter forks the conversation into a new side-by-side pane (it is NOT queued), while a plain prompt ("tell me a joke") is still added to the "1 queued" panel. See below. -
[x] I have manually tested my changes locally
Screenshots / Videos
Verified via computer use on a local build (queued-prompts mode ON, agent actively streaming a response).
/fork runs immediately — forks into a new side-by-side pane instead of being queued:

Control — a plain follow-up prompt is still queued ("1 queued"):

Agent Mode
- [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode
CHANGELOG-BUG-FIX: Slash commands that emit an action (like /fork) now run immediately instead of being captured as a queued prompt when queued-prompts mode is on.
Conversation: https://staging.warp.dev/conversation/9f4d9c88-9146-4841-bf32-c0c6e9f83fd4 Run: https://oz.staging.warp.dev/runs/019eff55-5238-7a84-924c-bf2f190ed677
This PR was generated with Oz.
@warp-dev-github-integration[bot]
I'm starting a first review of this pull request.
You can view the conversation on Warp.
I completed the review and no human review was requested for this pull request.
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
Addressed the review feedback (visual evidence): the Screenshots / Videos section of the PR description now embeds a screen capture demonstrating the end-to-end behavior with queued-prompts mode enabled:
/forkruns immediately and forks the conversation into a new side-by-side pane (it is not queued).- Control: a plain follow-up prompt in the same state is still queued ("1 queued").
These were captured by building and running Warp and driving it via computer use during a live streaming agent response. The behavior is also covered by automated tests (slash_fork_bypasses_prompt_queue_while_in_progress, slash_compact_still_queues_while_in_progress, and the classifier unit test). Re-requesting review.
/oz-review