
Agent Deck
- 29 installs
- 177 repo stars
- Updated May 10, 2026
- artwist-polyakov/polyakov-claude-skills
agent-deck is a Claude skill that drives the agent-deck CLI to launch, monitor, and collect output from child Claude agent sessions in the terminal.
About
This skill drives the agent-deck CLI to launch, monitor, and collect results from child Claude agent sessions from the terminal. A developer uses it when they want to spawn sub-agents, check their status, or retrieve their output, with fire-and-forget, on-demand, or blocking modes. It also attaches MCP servers such as exa and context7 to sessions and manages the session lifecycle. Documentation is primarily in Russian.
- Manages terminal sessions for AI agents via the agent-deck CLI
- Launches, monitors, and collects output from child Claude sub-agent sessions
- Attaches MCP servers (exa, firecrawl, context7) to sessions and restarts to apply them
Agent Deck by the numbers
- 29 all-time installs (skills.sh)
- Ranked #9,417 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
agent-deck capabilities & compatibility
- Capabilities
- codex review
- Use cases
- orchestration
- Pricing
- Free
What agent-deck says it does
Менеджер терминальных сессий для AI агентов. Позволяет запускать, контролировать и получать результаты от дочерних Claude сессий.
npx skills add https://github.com/artwist-polyakov/polyakov-claude-skills --skill agent-deckAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 29 |
|---|---|
| repo stars | ★ 177 |
| Last updated | May 10, 2026 |
| Repository | artwist-polyakov/polyakov-claude-skills ↗ |
What it does
Launch, monitor, and collect output from child Claude sub-agent sessions through the agent-deck CLI.
Who is it for?
Developers orchestrating multiple Claude sub-agent sessions from the terminal
When should I use this skill?
The user says 'launch sub-agent', 'start session', 'check session', or 'show agent output'
What you get
Child agent sessions launched, monitored by status, and their outputs retrieved via the agent-deck CLI.
- launched sub-agent sessions
- session status
- agent output
By the numbers
- 4 session statuses (running, waiting, idle, error)
- 3 result modes (fire-and-forget, on-demand, blocking)
Files
Agent Deck CLI
Менеджер терминальных сессий для AI агентов. Позволяет запускать, контролировать и получать результаты от дочерних Claude сессий.
Запуск суб-агента
Триггеры: "запусти агента", "запусти саб-агента", "launch sub-agent"
Простой запуск (CLI команды)
# Создать сессию
agent-deck add -t "Название" -c claude /path/to/workdir
# Создать как дочернюю сессию текущего агента
agent-deck add -t "Название" --parent "Родитель" -c claude /path/to/workdir
# Запустить
agent-deck session start "Название"
# Отправить задачу
agent-deck session send "Название" "Твоя задача..."Автоматический запуск (скрипт)
scripts/launch-subagent.sh "Название" "Промпт" [--mcp exa] [--wait]Скрипт автоматически:
- Определяет текущую сессию и профиль
- Создаёт дочернюю сессию
- Ждёт инициализации Claude
- Отправляет промпт
Режимы получения результата
| Режим | Команда | Когда использовать |
|---|---|---|
| Fire & forget | (без --wait) | По умолчанию. Скажи: "Спроси меня когда будет готово" |
| On-demand | agent-deck session output "Название" | Когда пользователь спрашивает |
| Blocking | --wait | Нужен немедленный результат |
---
Проверка статуса
Триггеры: "проверь сессию", "проверь статус", "check session"
agent-deck status # Все сессии (сводка)
agent-deck session show "Название" # Детали конкретной сессии
agent-deck session show -json "Название" # JSON формат
agent-deck session current # Текущая сессия (в которой работаем)
agent-deck session current --json # Текущая сессия в JSONСтатусы:
●работает (running)◐ждёт ввода (waiting)○простаивает (idle)✕ошибка (error)
---
Получение результата
Триггеры: "покажи вывод агента", "что агент ответил", "show agent output"
agent-deck session output "Название"---
MCP подключение
agent-deck mcp list # Доступные MCP серверы
agent-deck mcp attach "Название" exa # Подключить MCP к сессии
agent-deck session restart "Название" # ОБЯЗАТЕЛЬНО после подключения!Рекомендуемые MCP
| Задача | MCP серверы |
|---|---|
| Веб-поиск | exa, firecrawl |
| Документация кода | context7 |
| Сложные рассуждения | sequential-thinking |
---
Управление сессиями
# Жизненный цикл
agent-deck session start "Название"
agent-deck session stop "Название"
agent-deck session restart "Название"
# Список всех сессий
agent-deck ls
agent-deck ls -json
# Удалить сессию
agent-deck rm "Название"---
Важные правила
1. Флаги перед аргументами: session show -json name (не session show name -json) 2. После mcp attach обязательно session restart для применения изменений 3. Избегать polling результатов из других агентов — это может мешать целевой сессии 4. Идентификация сессии: можно использовать название, ID (≥6 символов) или путь
---
Примеры использования
Запуск исследовательского агента
# Создать агента для веб-исследования
agent-deck add -t "Researcher" -c claude --mcp exa /tmp/research
agent-deck session start "Researcher"
agent-deck session send "Researcher" "Найди информацию о последних трендах в AI"Проверка готовности
# Проверить статус
agent-deck session show "Researcher"
# Если статус ◐ (waiting) — агент закончил, получить результат:
agent-deck session output "Researcher"Automation Patterns
Sub-Agent Script (Primary)
# Fire and forget (recommended)
scripts/launch-subagent.sh "Research" "Find info about X" --mcp exa
# With blocking wait
scripts/launch-subagent.sh "Query" "Answer Y" --wait --timeout 120
# Multiple MCPs
scripts/launch-subagent.sh "Deep Research" "Analyze Z" --mcp exa --mcp firecrawlManual Sub-Agent Pattern
When script unavailable:
PARENT=$(agent-deck session current -q)
PROFILE=$(agent-deck session current --json | jq -r '.profile')
agent-deck -p "$PROFILE" add -t "Task" --parent "$PARENT" -c claude /tmp/task
agent-deck -p "$PROFILE" session start "Task"
sleep 10 # Wait for Claude readiness
agent-deck -p "$PROFILE" session send "Task" "Your prompt"Check Output
# Check status
agent-deck session show "Task" | grep Status
# Get response when waiting (◐)
agent-deck session output "Task"Batch Operations
# Start multiple sessions
for name in api frontend backend; do
agent-deck session start "$name"
done
# Attach MCPs to multiple sessions
for session in proj1 proj2; do
agent-deck mcp attach "$session" exa
agent-deck session restart "$session"
doneJSON Scripting
# Get all waiting sessions
agent-deck list --json | jq -r '.[] | select(.status == "waiting") | .title'
# Count by status
agent-deck status --json | jq '.running, .waiting, .idle'Warnings
1. Avoid external polling agents - They can send messages that interfere with target sessions 2. Use on-demand checks - Let user request output when ready 3. Flags before arguments - session show --json name not session show name --json
CLI Reference
Global Flags
-p <profile>, --profile=<profile> # Use specific profile
--json # JSON output
-q, --quiet # Minimal outputCommands
add
agent-deck add [path] [options]| Flag | Description |
|---|---|
-t, --title | Session title |
-g, --group | Group path |
-c, --cmd | Command (claude, gemini, etc.) |
--parent | Parent session (creates child) |
--mcp | Attach MCP (repeatable) |
agent-deck add -t "My Project" -c claude .
agent-deck add -t "Child" --parent "Parent" -c claude /tmp/x
agent-deck add -t "Research" -c claude --mcp exa --mcp firecrawl /tmp/rsession
agent-deck session <command> [options] <name>| Command | Description |
|---|---|
start | Start session (creates tmux) |
stop | Stop session |
restart | Restart (reloads MCPs) |
attach | Attach to tmux (Ctrl+Q to detach) |
send "msg" | Send message |
output | Get last response |
show | Show details |
current | Detect current session |
fork | Fork Claude session |
agent-deck session start "My Project"
agent-deck session send "My Project" "Hello"
agent-deck session output "My Project"
agent-deck session current -q # Just name
agent-deck session current --json # Full JSONmcp
agent-deck mcp <command> [options]| Command | Description |
|---|---|
list | Show available MCPs |
attached <name> | Show attached MCPs |
attach <name> <mcp> | Attach MCP |
detach <name> <mcp> | Detach MCP |
Note: Run session restart after attach/detach.
group
agent-deck group <command> [options]| Command | Description |
|---|---|
list | List groups |
create <name> | Create group |
delete <name> | Delete group |
move <session> <group> | Move session |
Other
agent-deck list [--json] # List sessions
agent-deck status [-v|-q] # Status summary
agent-deck remove <name> # Remove sessionSession Resolution
Commands accept:
- Title:
"My Project" - ID prefix:
abc123(≥6 chars) - Path:
/path/to/project
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Error |
| 2 | Not found |
Configuration Reference
All options for ~/.agent-deck/config.toml.
Table of Contents
- Top-Level
- [[claude] Section](#claude-section)
- [[logs] Section](#logs-section)
- [[updates] Section](#updates-section)
- [[global_search] Section](#global_search-section)
- [[mcp_pool] Section](#mcp_pool-section)
- [[mcps.*] Section](#mcps-section)
- [[tools.*] Section](#tools-section)
Top-Level
default_tool = "claude" # Pre-selected tool when creating sessions[claude] Section
Claude Code integration settings.
[claude]
config_dir = "~/.claude-work" # Path to Claude config directory
dangerous_mode = true # Enable --dangerously-skip-permissions| Key | Type | Default | Description |
|---|---|---|---|
config_dir | string | ~/.claude | Claude config directory. Override with CLAUDE_CONFIG_DIR env. |
dangerous_mode | bool | false | Skip Claude permission dialogs. Required for automation. |
[logs] Section
Session log file management.
[logs]
max_size_mb = 10 # Max size before truncation
max_lines = 10000 # Lines to keep when truncating
remove_orphans = true # Delete logs for removed sessions| Key | Type | Default | Description |
|---|---|---|---|
max_size_mb | int | 10 | Max log file size in MB. |
max_lines | int | 10000 | Lines to keep after truncation. |
remove_orphans | bool | true | Clean up logs for deleted sessions. |
Logs location: ~/.agent-deck/logs/agentdeck_<session>_<id>.log
[updates] Section
Auto-update settings.
[updates]
auto_update = false # Auto-install updates
check_enabled = true # Check on startup
check_interval_hours = 24 # Check frequency
notify_in_cli = true # Show in CLI commands| Key | Type | Default | Description |
|---|---|---|---|
auto_update | bool | false | Install updates without prompting. |
check_enabled | bool | true | Enable startup update checks. |
check_interval_hours | int | 24 | Hours between checks. |
notify_in_cli | bool | true | Show updates in CLI (not just TUI). |
[global_search] Section
Search across all Claude conversations.
[global_search]
enabled = true # Enable global search
tier = "auto" # "auto", "instant", "balanced"
memory_limit_mb = 100 # Max RAM for index
recent_days = 90 # Limit to last N days (0 = all)
index_rate_limit = 20 # Files/second for indexing| Key | Type | Default | Description |
|---|---|---|---|
enabled | bool | true | Enable G key global search. |
tier | string | "auto" | Strategy: instant (fast, more RAM), balanced (LRU cache). |
memory_limit_mb | int | 100 | Max memory for balanced tier. |
recent_days | int | 90 | Only search recent conversations. |
index_rate_limit | int | 20 | Indexing speed (reduce for less CPU). |
[mcp_pool] Section
Share MCP processes across sessions via Unix sockets.
[mcp_pool]
enabled = false # Enable socket pooling
auto_start = true # Start pool on launch
pool_all = false # Pool ALL MCPs
exclude_mcps = [] # Exclude from pool_all
fallback_to_stdio = true # Fallback if socket fails
show_pool_status = true # Show 🔌 indicator| Key | Type | Default | Description |
|---|---|---|---|
enabled | bool | false | Master switch for pooling. |
pool_all | bool | false | Pool all available MCPs. |
exclude_mcps | array | [] | MCPs to exclude when pool_all=true. |
fallback_to_stdio | bool | true | Use stdio if socket unavailable. |
Benefits: 30 sessions x 5 MCPs = 150 processes -> 5 shared processes (90% memory savings).
Socket location: /tmp/agentdeck-mcp-{name}.sock
[mcps.*] Section
Define MCP servers. One section per MCP.
STDIO MCPs (Local)
[mcps.exa]
command = "npx"
args = ["-y", "exa-mcp-server"]
env = { EXA_API_KEY = "your-key" }
description = "Web search via Exa AI"| Key | Type | Required | Description |
|---|---|---|---|
command | string | Yes | Executable (npx, docker, node, python). |
args | array | No | Command arguments. |
env | map | No | Environment variables. |
description | string | No | Help text in MCP Manager. |
HTTP/SSE MCPs (Remote)
[mcps.remote]
url = "https://api.example.com/mcp"
transport = "http" # or "sse"
description = "Remote MCP server"Common MCP Examples
# Web search
[mcps.exa]
command = "npx"
args = ["-y", "@anthropics/exa-mcp"]
env = { EXA_API_KEY = "xxx" }
# GitHub
[mcps.github]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-github"]
env = { GITHUB_TOKEN = "ghp_xxx" }
# Filesystem
[mcps.filesystem]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-filesystem", "/path"]
# Sequential thinking
[mcps.thinking]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-sequential-thinking"]
# Playwright
[mcps.playwright]
command = "npx"
args = ["-y", "@anthropics/playwright-mcp"]
# Memory
[mcps.memory]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-memory"][tools.*] Section
Define custom AI tools.
[tools.my-ai]
command = "my-ai-assistant"
icon = "🧠"
busy_patterns = ["thinking...", "processing..."]| Key | Type | Required | Description |
|---|---|---|---|
command | string | Yes | Command to run. |
icon | string | No | Emoji for TUI (default: 🐚). |
busy_patterns | array | No | Strings indicating busy state. |
Built-in icons: claude=🤖, gemini=✨, opencode=🌐, codex=💻, cursor=📝, shell=🐚
Complete Example
default_tool = "claude"
[claude]
config_dir = "~/.claude-work"
dangerous_mode = true
[logs]
max_size_mb = 10
max_lines = 10000
remove_orphans = true
[updates]
check_enabled = true
check_interval_hours = 24
[global_search]
enabled = true
tier = "auto"
recent_days = 90
[mcp_pool]
enabled = false
[mcps.exa]
command = "npx"
args = ["-y", "exa-mcp-server"]
env = { EXA_API_KEY = "your-key" }
description = "Web search"
[mcps.github]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-github"]
env = { GITHUB_TOKEN = "ghp_xxx" }
description = "GitHub access"Environment Variables
| Variable | Purpose |
|---|---|
AGENTDECK_PROFILE | Override default profile |
CLAUDE_CONFIG_DIR | Override Claude config dir |
AGENTDECK_DEBUG=1 | Enable debug logging |
MCP Management Guide
Guide for managing Model Context Protocol (MCP) servers with agent-deck.
Overview
MCPs extend Claude's capabilities. Agent-deck supports:
- LOCAL - Project-specific (
.mcp.jsonfile) - GLOBAL - All projects (
~/.claude-work/.claude.json)
When to Use Which
Use LOCAL when:
- MCP is specific to this project
- Different projects need different configurations
Use GLOBAL when:
- MCP is useful across all projects
- MCP provides general-purpose functionality
Commands
# List available MCPs
agent-deck mcp list
# Check what's attached
agent-deck mcp attached my-project
# Attach locally (default)
agent-deck mcp attach my-project exa
# Attach globally
agent-deck mcp attach my-project memory -global
# Attach and restart to load immediately
agent-deck mcp attach my-project playwright -restart
# Detach
agent-deck mcp detach my-project exa
agent-deck mcp detach my-project memory -globalMCP Configuration
MCPs are defined in ~/.agent-deck/config.toml:
[mcps.exa]
command = "npx"
args = ["-y", "exa-mcp-server"]
env = { EXA_API_KEY = "your-key" }
description = "Web search via Exa AI"Best Practices
1. Start Local, Promote to Global - Test locally first 2. Use Restart Flag - For immediate effect: -restart 3. Check Attached MCPs - Before debugging tool access issues
Troubleshooting
MCP Not Available:
agent-deck mcp attached my-project # Check if attached
agent-deck session restart my-project # Reload MCPsChanges Not Taking Effect:
agent-deck session restart my-projectProfile Management Guide
Guide for using profiles to organize agent-deck sessions.
Overview
Profiles provide complete isolation between different sets of sessions.
Common Use Cases:
- Personal vs Work separation
- Client isolation
- Testing/demo environments
Commands
# List profiles
agent-deck profile list
# Create profile
agent-deck profile create work
# Set default
agent-deck profile default work
# Use specific profile
agent-deck -p work list
agent-deck -p work session start my-project
# Delete profile
agent-deck profile delete old-profileProfile Storage
~/.agent-deck/profiles/
├── default/
│ └── sessions.json
├── work/
│ └── sessions.json
└── demo/
└── sessions.jsonEnvironment Variable
export AGENTDECK_PROFILE=work
agent-deck list # Uses 'work' profileBest Practices
1. Use explicit -p flag for important operations 2. Use consistent naming conventions 3. Set a default profile for primary usage
Troubleshooting Guide
Common issues and solutions for agent-deck.
Quick Fixes
| Issue | Solution |
|---|---|
Session shows ✕ error | agent-deck session start <name> |
| MCPs not loading | agent-deck session restart <name> |
| CLI changes not in TUI | Press Ctrl+R to refresh |
| Flag not working | Put flags BEFORE arguments |
| Fork fails | Check session has valid Claude session ID |
| Status stuck | Wait 2 seconds or press u to mark unread |
Common Issues
Flags Ignored
Problem: Flags after positional arguments are silently ignored.
# WRONG - message not sent
agent-deck session start my-project -m "Hello"
# CORRECT
agent-deck session start -m "Hello" my-projectMCP Not Available
1. Check if attached: agent-deck mcp attached <session> 2. Restart session: agent-deck session restart <session> 3. Verify in config: agent-deck mcp list
Session ID Not Detected
Claude session ID needed for fork/resume. Check:
agent-deck session show <name> --json | jq '.claude_session_id'If null, restart session and interact with Claude.
High CPU Usage
With many sessions: Normal if batched updates. Check:
agent-deck status # Should show ~0.5% CPU when idleWith active session: Normal (live preview updates).
Log Files Too Large
Add to ~/.agent-deck/config.toml:
[logs]
max_size_mb = 1
max_lines = 2000Global Search Not Working
Check config:
[global_search]
enabled = trueAlso verify ~/.claude/projects/ exists and has content.
Debugging
Enable debug logging:
AGENTDECK_DEBUG=1 agent-deckCheck session logs:
tail -100 ~/.agent-deck/logs/agentdeck_<session>_*.logReport a Bug
If something isn't working, please create a GitHub issue with all relevant context.
Step 1: Gather Information
Run these commands and save output:
# Version info
agent-deck version
# Current status
agent-deck status --json
# Session details (if session-related)
agent-deck session show <session-name> --json
# Config (sanitized - removes secrets)
cat ~/.agent-deck/config.toml | grep -v "KEY\|TOKEN\|SECRET\|PASSWORD"
# Recent logs (if error occurred)
tail -100 ~/.agent-deck/logs/agentdeck_<session>_*.log 2>/dev/null
# System info
uname -a
echo "tmux: $(tmux -V 2>/dev/null || echo 'not installed')"Step 2: Describe the Issue
Prepare clear answers to:
1. What did you try? (exact command or TUI action) 2. What happened? (error message, unexpected behavior) 3. What did you expect? (correct behavior) 4. Can you reproduce it? (steps to trigger)
Step 3: Create GitHub Issue
Go to: https://github.com/asheshgoplani/agent-deck/issues/new
Use this template:
## Description
[Brief description of the issue]
## Steps to Reproduce
1. [First step]
2. [Second step]
3. [What happened]
## Expected Behavior
[What should have happened]
## Environment
- agent-deck version: [output of `agent-deck version`]
- OS: [macOS/Linux/WSL]
- tmux version: [output of `tmux -V`]
## Debug Output
<details>
<summary>Status JSON</summary>
[paste agent-deck status --json]
</details>
<details>
<summary>Config (sanitized)</summary>
[paste sanitized config]
</details>
<details>
<summary>Logs</summary>
[paste relevant log lines]
</details>Step 4: Follow Up
- Check for responses on your issue
- Test any suggested fixes
- Update issue with results
Recovery
Session Metadata Lost
Backups at:
~/.agent-deck/profiles/default/sessions.json.bak
~/.agent-deck/profiles/default/sessions.json.bak.1
~/.agent-deck/profiles/default/sessions.json.bak.2Restore:
cp ~/.agent-deck/profiles/default/sessions.json.bak \
~/.agent-deck/profiles/default/sessions.jsontmux Sessions Lost
Session logs preserved:
tail -500 ~/.agent-deck/logs/agentdeck_<session>_*.logProfile Corrupted
Create fresh:
agent-deck profile create fresh
agent-deck profile default freshCritical Warnings
NEVER run these commands - they destroy ALL agent-deck sessions:
# DO NOT RUN
tmux kill-server
tmux ls | grep agentdeck | xargs tmux kill-sessionRecovery impossible - metadata backups exist but tmux sessions are gone.
TUI Reference
Complete reference for agent-deck Terminal UI features.
Keyboard Shortcuts
Navigation
| Key | Action |
|---|---|
j / ↓ | Move down |
k / ↑ | Move up |
h / ← | Collapse group / go to parent |
l / → / Tab | Toggle expand/collapse group |
1-9 | Jump to Nth root group |
Session Actions
| Key | Action |
|---|---|
Enter | Attach to session OR toggle group |
n | New session (inherits current group) |
r | Rename session or group |
R | Restart session (reloads MCPs) |
K / J | Move item up/down in order |
m | Move session to different group |
M | Open MCP Manager (Claude/Gemini) |
d | Delete session or group |
u | Mark unread (idle -> waiting) |
f | Quick fork (Claude only) |
F | Fork with options (Claude only) |
Group Actions
| Key | Action |
|---|---|
g | Create group (subgroup if on group) |
e | Rename group (alias for r) |
Search & Filter
| Key | Action |
|---|---|
/ | Local search (fuzzy) |
G | Global search (all Claude conversations) |
Tab | Switch between local/global search |
0 | Clear filter (show all) |
! | Filter: running only (toggle) |
@ | Filter: waiting only (toggle) |
# | Filter: idle only (toggle) |
$ | Filter: error only (toggle) |
Global
| Key | Action |
|---|---|
? | Help overlay |
i | Import existing tmux sessions |
Ctrl+R | Manual refresh |
Ctrl+Q | Detach (keep tmux running) |
q / Ctrl+C | Quit |
Status Indicators
| Symbol | Status | Color | Meaning |
|---|---|---|---|
● | Running | Green | Active, content changed in last 2s |
◐ | Waiting | Yellow | Stopped, unacknowledged |
○ | Idle | Gray | Stopped, acknowledged |
✕ | Error | Red | tmux session doesn't exist |
⟳ | Starting | Yellow | Session launching |
Dialogs
New Session (n)
Fields:
- Session name (required)
- Project path (required, supports
~/) - Command (claude/gemini/opencode/codex/custom)
- Parent group (auto-selected)
Controls: Tab move fields | Enter create | Esc cancel
MCP Manager (M)
Layout:
- Two columns: Attached | Available
- Two scopes: LOCAL | GLOBAL
Controls:
Tab- Switch scope←/→- Switch columns↑/↓- NavigateSpace- Toggle MCPEnter- Apply changesEsc- Cancel
Indicators:
(l)LOCAL scope(g)GLOBAL scope(p)PROJECT scope🔌MCP is pooled⟳Pending restart
Fork Dialog (F)
Fields:
- Session title (pre-filled)
- Group (auto-selected)
Controls: Enter fork | Esc cancel
Delete Confirmation (d)
For sessions: Warning about tmux kill, process termination
For groups: Sessions move to default (not deleted)
Controls: y confirm | n/Esc cancel
Search
Local Search (/)
- Fuzzy search session titles and groups
- Max 10 results
↑/↓orCtrl+K/JnavigateEnterselect |Tabswitch to global |Escclose
Global Search (G)
- Full content search across
~/.claude/projects/ - Regex + fuzzy matching
- Recency ranking
- Split view: results + preview
[/]scroll previewEntercreate/jump to session
Config:
[global_search]
enabled = true
recent_days = 30Preview Pane
- Shows last ~500 lines of session's tmux pane
- Auto-updates every 2 seconds
- Launch animation: 6-15s for Claude/Gemini
Layout
- < 50 cols: List only
- 50-79 cols: Stacked (list above preview)
- 80+ cols: Side-by-side (default)
Tool Icons
| Tool | Icon | Color |
|---|---|---|
| Claude | 🤖 | Orange |
| Gemini | ✨ | Purple |
| OpenCode | 🌐 | Cyan |
| Codex | 💻 | Cyan |
| Cursor | 📝 | Blue |
| Shell | 🐚 | Default |
Color Scheme (Tokyo Night)
| Element | Color |
|---|---|
| Accent (selection) | #7aa2f7 |
| Running | #9ece6a |
| Waiting | #e0af68 |
| Error | #f7768e |
| Groups | #7dcfff |
| Background | #1a1b26 |
| Surface | #24283b |
Hidden Features
- `Ctrl+K/J`: Vim-style navigation in search
- Numbers 1-9: Jump to root groups instantly
- Status filters are toggles: Press again to turn off
#!/bin/bash
# launch-subagent.sh - Launch a sub-agent as child of current session
#
# Usage: launch-subagent.sh "Title" "Prompt" [options]
#
# Options:
# --mcp <name> Attach MCP (can repeat)
# --wait Poll until complete, return output
# --timeout <sec> Wait timeout (default: 300)
# --init-timeout <s> Claude init timeout (default: 15)
#
# Examples:
# launch-subagent.sh "Research" "Find info about X"
# launch-subagent.sh "Task" "Do Y" --mcp exa --mcp firecrawl
# launch-subagent.sh "Query" "Answer Z" --wait --timeout 120
set -e
# Parse arguments
TITLE=""
PROMPT=""
MCPS=()
WAIT=false
TIMEOUT=300
INIT_TIMEOUT=15
while [ $# -gt 0 ]; do
case "$1" in
--mcp)
MCPS+=("$2")
shift 2
;;
--wait)
WAIT=true
shift
;;
--timeout)
TIMEOUT="$2"
shift 2
;;
--init-timeout)
INIT_TIMEOUT="$2"
shift 2
;;
*)
if [ -z "$TITLE" ]; then
TITLE="$1"
elif [ -z "$PROMPT" ]; then
PROMPT="$1"
fi
shift
;;
esac
done
if [ -z "$TITLE" ] || [ -z "$PROMPT" ]; then
echo "Usage: launch-subagent.sh \"Title\" \"Prompt\" [--mcp name] [--wait]" >&2
exit 1
fi
# Detect current session - parse JSON properly without grep hack
CURRENT_OUTPUT=$(agent-deck session current --json 2>/dev/null) || {
echo "Error: Not in an agent-deck session" >&2
exit 1
}
# Extract JSON (last valid JSON object in output)
CURRENT_JSON=$(echo "$CURRENT_OUTPUT" | grep -E '^\{' | tail -1)
if [ -z "$CURRENT_JSON" ]; then
echo "Error: Could not parse session info" >&2
exit 1
fi
PARENT=$(echo "$CURRENT_JSON" | jq -r '.session // empty')
PROFILE=$(echo "$CURRENT_JSON" | jq -r '.profile // empty')
if [ -z "$PARENT" ]; then
echo "Error: Not in an agent-deck session" >&2
exit 1
fi
# Create work directory with better sanitization
# Remove all non-alphanumeric chars except dash, convert to lowercase
SAFE_TITLE=$(echo "$TITLE" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9-]/-/g' | sed 's/--*/-/g' | sed 's/^-//' | sed 's/-$//')
# Fallback if title becomes empty after sanitization
if [ -z "$SAFE_TITLE" ]; then
SAFE_TITLE="subagent-$(date +%s)"
fi
# Use TMPDIR if set, otherwise /tmp
WORK_DIR="${TMPDIR:-/tmp}/${SAFE_TITLE}"
mkdir -p "$WORK_DIR"
# Build command as array (safe, no eval needed)
ADD_ARGS=(-p "$PROFILE" add -t "$TITLE" --parent "$PARENT" -c claude)
for mcp in "${MCPS[@]}"; do
ADD_ARGS+=(--mcp "$mcp")
done
ADD_ARGS+=("$WORK_DIR")
# Create and start session (using array expansion, not eval)
agent-deck "${ADD_ARGS[@]}"
agent-deck -p "$PROFILE" session start "$TITLE"
# Get tmux session name for readiness check
TMUX_SESSION=$(agent-deck -p "$PROFILE" session show "$TITLE" 2>/dev/null | grep '^Tmux:' | awk '{print $2}')
# Wait for Claude to be ready (configurable timeout)
echo "Waiting for Claude to initialize..."
for ((i=1; i<=INIT_TIMEOUT; i++)); do
# Check if Claude is showing a prompt (has substantial content)
PANE_CONTENT=$(tmux capture-pane -t "$TMUX_SESSION" -p 2>/dev/null | tail -5) || true
# Claude is ready when it shows the project path or prompt
if echo "$PANE_CONTENT" | grep -qE "(>|claude|Claude Code|$WORK_DIR)" 2>/dev/null; then
sleep 2 # Extra buffer for stability
break
fi
sleep 1
done
# Send prompt
agent-deck -p "$PROFILE" session send "$TITLE" "$PROMPT"
echo ""
echo "Sub-agent launched:"
echo " Title: $TITLE"
echo " Parent: $PARENT"
echo " Profile: $PROFILE"
echo " Path: $WORK_DIR"
if [ ${#MCPS[@]} -gt 0 ]; then
echo " MCPs: ${MCPS[*]}"
fi
echo ""
echo "Check output with: agent-deck session output \"$TITLE\""
# If --wait, poll until complete
if [ "$WAIT" = "true" ]; then
echo ""
echo "Waiting for completion (timeout: ${TIMEOUT}s)..."
START_TIME=$(date +%s)
while true; do
# Get status, handle both unicode and text formats
STATUS_LINE=$(agent-deck -p "$PROFILE" session show "$TITLE" 2>/dev/null | grep '^Status:' || true)
# Check for waiting status (both unicode ◐ and text "waiting")
if echo "$STATUS_LINE" | grep -qE '(◐|waiting|idle)'; then
echo "Complete!"
echo ""
echo "=== Response ==="
agent-deck -p "$PROFILE" session output "$TITLE"
exit 0
fi
ELAPSED=$(($(date +%s) - START_TIME))
if [ $ELAPSED -ge $TIMEOUT ]; then
echo "Timeout after ${TIMEOUT}s (session still running)" >&2
echo "Check later with: agent-deck session output \"$TITLE\""
exit 1
fi
sleep 5
done
fi
Related skills
FAQ
What result modes does agent-deck support?
Fire-and-forget (default), on-demand via session output, and blocking with --wait for an immediate result.
How do you attach an MCP server to a session?
Run agent-deck mcp attach on the session, then always run session restart to apply the change.