[BUG] Desktop: `immediate: true` commands wait for the turn to end
A plugin command registered with immediate: true runs at once when typed during a turn in the terminal, as CommandSpec.immediate documents. In the desktop app it waits for the turn to end instead.
Repro: register $.command.register({ name: 'x', description: '…', immediate: true }). In a desktop session, send a prompt that runs sleep 20. While the command runs, type /x and press Enter. The transcript's queue-operation rows show the enqueue right away and the dequeue only after the turn's stop hooks, about 20 s later. The same steps in the terminal run /x at once.
Seen in Claude Code 2.1.296, in the Claude desktop app on macOS.
Related: #101751 asks for the same kind of command to run without disturbing a pending AskUserQuestion on desktop. This report is about every turn, with or without a pending question.
_Written by Claude_