[FEATURE] Plugin slash commands with immediate: true should run without disturbing a pending AskUserQuestion in the desktop app
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet (related but different: #87037, #87933)
- [x] This is a single feature request (not multiple features)
Problem Statement
A plugin command registered with $.command.register({ name, description, immediate: true }) is documented to run at once when typed mid-turn, instead of waiting for the turn to end. In the desktop app that does not hold while an AskUserQuestion is open: sending the command closes the question unanswered, and the command then runs.
My plugin's /sidequest command only starts a background session (claude --bg) and returns a { text } line. It needs no model turn and touches nothing of the current turn, yet it costs me the open question, which the agent then has to ask again.
The app's own commands show the behaviour I expected. /effort is an app-side menu, and running it with a question open leaves the question open.
Proposed Solution
Make immediate: true plugin commands behave like the app-side commands in the prompt box: run the command without submitting a message into the pending turn, print its { text } result, and leave an open AskUserQuestion (and any other pending dialog) alone.
The prompt box appears to submit a plugin command as an ordinary message before the engine sees it, so the engine-side immediate flag cannot prevent the dismissal. This is my inference from the observed behaviour; I did not find the code path. The fix may be that the app treats a command the engine reports as immediate (the immediate field of $.command.list()) as non-submitting.
Alternative Solutions
- Send the command from the terminal CLI, or only when no question is open. Works, but gives up the desktop app's prompt box.
- Put the work in a hook or a tool the agent calls. That puts it back into a model turn, which is what the command avoids.
Priority
Medium - Would be very helpful
Feature Category
Interactive mode (TUI) (nearest available option; the behaviour is in the desktop app's prompt box)
Use Case Example
- An agent session asks me a design question through AskUserQuestion.
- While thinking about it I want to start a background side task:
/sidequest --fresh .... - Today the question disappears when I press Enter and the agent has to ask again.
- With the change, the side task starts, its confirmation line prints, and the question stays open.
Additional Context
- Versions: desktop app 2.31226.1, engine 2.1.295 and 2.1.296, Windows 11, 2026-10-13.
- Tested: the command registered with and without
immediate: true; both dismissed the question./effortdid not. - Related: #87037 (queued slash commands wait for the turn to end), #87933 (mid-turn user message delivery).