List Claude Code Sessions
List all running ai-* prefixed tmux sessions and show their current status.
Instructions
- •
Get all ai- sessions:*
bashtmux list-sessions -F "#{session_name}" 2>/dev/null | grep -E '^ai-' || echo "" - •
For each session, capture recent output:
bash"$PLUGIN_DIR/bin/capture-session" "<session_name>" 15
- •
Analyze each session's output to determine status:
- •
working- Has✢,⏺, orThinking… - •
idle- At❯prompt with no activity - •
permission-prompt- Waiting for permission approval - •
waiting-input- Waiting for user input (y/n, choice, text) - •
stuck- In editor, pager, or hanging
- •
- •
Output a table:
codeSession Status Details ─────────────────────────────────────────────────── ai-worker-001 working Editing src/api.ts ai-worker-002 permission-prompt Bash: npm install ai-brainstorm-design idle At prompt
- •
If no sessions found:
codeNo ai-* sessions found. To create one: /session-tools:spawn-session worker