By copyx
Claude Code Queue Manager - auto-switch between multiple Claude Code sessions using FIFO queue
FIFO queue-based auto-switcher for multiple Claude Code sessions via tmux.
Run several Claude Code sessions in a single tmux session. When you submit a prompt in the current window, ccq automatically switches you to the session that has been waiting for input the longest. No more missed idle prompts.
curl -fsSL https://raw.githubusercontent.com/copyx/claude-code-queue/main/install.sh | bash
Prerequisites: tmux must be installed first. See tmux installation guide.
For Claude Code users: Install the plugin first, then run the /ccq:install-cli skill.
Add the marketplace and install the plugin:
/plugin marketplace add copyx/claude-code-queue
/plugin install ccq@claude-code-queue
Then install the CLI binary:
/ccq:install-cli
ccq-darwin-amd64ccq-darwin-arm64ccq-linux-amd64ccq-linux-arm64~/.local/bin/ccqchmod +x ~/.local/bin/ccq~/.local/bin is in your PATHgit clone https://github.com/copyx/claude-code-queue.git
cd claude-code-queue
make build
make install # copies the binary to ~/.local/bin/ccq
Make sure ~/.local/bin is on your PATH.
ccq
Creates a ccq tmux session, launches Claude Code inside it, and attaches your terminal. On first run you will be prompted to choose a tmux prefix key (Ctrl+Space is recommended since Claude Code uses most Ctrl combinations).
From a different terminal (or a different project directory), just run ccq again:
ccq
If a session already exists, ccq adds a new window and starts Claude Code in it. You'll see the new window briefly for initial setup (trust prompt, etc.), then ccq automatically returns you to your previous view.
While you work, ccq tracks every window's state through Claude Code hooks:
If all windows are busy, ccq stays on the current window until one becomes idle.
All keybindings use the tmux prefix you chose during setup.
| Key | Action |
|---|---|
prefix + a | Toggle auto/manual mode |
prefix + n | Next window (tmux built-in) |
prefix + p | Previous window (tmux built-in) |
In manual mode, state tracking still happens but ccq will not switch windows for you. Press prefix + a again to re-enable auto-switching (ccq immediately checks the queue and switches if needed).
ccq is a hook-driven state machine with no long-running daemon.
Notification, UserPromptSubmit, PostToolUse, PostToolUseFailure, SessionEnd).ccq _hook idle, ccq _hook busy, or ccq _hook remove as a short-lived process.@ccq_state, @ccq_idle_since) to track which windows are idle and when they became idle.ccq issues a tmux select-window to the oldest idle window.Configuration is stored at ~/.config/ccq/config (JSON):
{
"prefix": "C-Space"
}
| Key | Description | Default |
|---|---|---|
prefix | tmux prefix key | Set on first run |
MIT
Matches all tools
Hooks run on every tool call, not just specific ones
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub copyx/claude-code-queue --plugin ccqProofreads English prompts before execution with educational feedback
Launch, control, and monitor other Claude Code sessions as workers via tmux
Claudikins Automatic Context Manager - seamless context handoff for Claude Code
Monitor and navigate Claude Code sessions across workspaces
IRC-style commands for managing Claude Code sessions
Mission Control for Claude Code — auto-starts a web dashboard, provides 90 MCP tools (sessions, stats, live monitoring, projects, teams, insights, coaching, and more), and adds 9 skills including /session-recap, /daily-cost, /standup, /coaching, /insights, and /team-status.
Core skills library for Claude Code: TDD, debugging, collaboration patterns, and proven techniques