Loading...
Loading...
Orchestrate Devin CLI subagents as background workers using tmux windows. Use when the user asks to spawn, coordinate, fan-out, or delegate work to multiple parallel agents, run background Devin sessions, or orchestrate long-running autonomous tasks from inside an existing Devin session.
npx skill4agent add harivansh-afk/tmux-subagents tmuxTMUX=$(which tmux)SESSION=$("$TMUX" display-message -p '#S')TMUXtmux new -s workskills/tmux/Doneerror:| Script | Usage | Description |
|---|---|---|
| | Create a new window and start a subagent. Default command: |
| | Send literal text to the window, wait 1s, press Enter |
| | Send |
# 1. Spawn (defaults to `devin --permission-mode dangerous`)
./scripts/spawn_subagent.sh agent-research-1
# 2. Send the task. Tell the subagent to write its output to a file
# and notify the parent when finished.
./scripts/send_command.sh agent-research-1 \
"Research X and write the result to /tmp/agent-research-1.md. When done, run: tmux display-message -d 5000 'agent-research-1: done'"
# 3. Wait for the notification (display-message or agentmail).
# DO NOT poll capture-pane in a loop.
# 4. Read /tmp/agent-research-1.md
# 5. Clean up
./scripts/exit_subagent.sh agent-research-1agent-{task}-{number}agent-refactor-2display-messagecapture-panespawn_subagent.shsend_command.shexit_subagent.shtmux/tmp/<window-name>.mdtmux display-message -d 5000 "<window-name>: <short message>"send_command.sh| Command | Description |
|---|---|
| Exit the agent gracefully |
| Clear the agent's context window |
| Compact context, preserving handoff notes |
references/tmux-commands.mdtmux