A Claude Code mod command with immediate: true runs during a turn
FactVerified 2 Oct 2026Holds anywhere
Fact. A statement and the evidence for it.
Statement#
A Claude Code mod command registered with immediate: true in $.command.register runs at once, even while a turn is still running, so a command that only opens a pane does not need to end a turn. The bundled claude-code.d.ts types do not say whether a command sends a Stop event, so keep a guard that stops automatic agents from starting if a Stop arrives after the command.
Evidence#
Seen while making the rkb pane command immediate; the guard stayed because the types are silent on Stop.
Also found by searching
- mod command immediate true runs while a turn is still running
- does a mod command send a Stop event
- pane command ends the turn in a Claude Code mod
- keep a guard that stops automatic agents if a Stop arrives after the command