Skip to content

Instantly share code, notes, and snippets.

@yshaaban
yshaaban / README.prompt_queue.md
Last active April 26, 2026 16:34
Claude Code prompt queue hook with interrupt-safe recovery

Claude Code Prompt Queue Hook

This gist contains a Claude Code hook that can queue normal user prompts while a turn is busy, then drain queued prompts through the Stop hook. Queueing is opt-in: the default mode is immediate, and /queue hold enables queueing for the current user state file.

It is intentionally fail-safe around Claude Code interruption behavior:

  • /queue status, /queue clear, and /queue recover are never queued.