Tmux Agents
v1.0.0Manage background coding agents in tmux sessions. Spawn Claude Code or other agents, check progress, get results.
Security Scan
OpenClaw
Suspicious
medium confidencePurpose & Capability
Name/description, required binary (tmux), the brew install of tmux, and included scripts align with a tool that spawns and manages tmux-based agent sessions. Using external agent CLIs (claude, codex, gemini, ollama) is consistent with the stated purpose.
Instruction Scope
spawn.sh sends commands into tmux that launch external CLIs and runs them with flags like --dangerously-skip-permissions and --auto-edit/--full-auto which may cause agents to accept permissions or auto-apply edits without interactive confirmation. The script also unconditionally cds to ~/clawd (a hardcoded path) which is not documented as required and may cause unexpected behavior or operate on files in that directory.
Install Mechanism
Install uses a Homebrew formula for tmux, a well-known package source; nothing is downloaded from an arbitrary URL and no archive extraction is used. This is low risk.
Credentials
The skill declares no required env vars or credentials, but the runtime expects external agent CLIs that typically require API keys/config (cloud agents). Those credentials are not requested or documented as required environment variables — the scripts assume the user has preconfigured CLIs. Also the hardcoded ~/clawd path is an implicit config that wasn't declared.
Persistence & Privilege
always is false and the skill does not request elevated or persistent platform-wide privileges, nor does it modify other skills or global agent settings.
What to consider before installing
This skill is coherent with its stated purpose, but review and consider the following before installing or running it:
- Review scripts (spawn.sh) locally: it cd's to ~/clawd — adjust or remove that if you don't want the agent working directory to be your home/project path.
- Be cautious about the agent CLI flags: --dangerously-skip-permissions, --auto-edit and --full-auto can make agents accept permissions or apply edits automatically. Use them only if you trust the agent and understand the consequences.
- The skill relies on external CLIs (claude, codex, gemini, ollama). Ensure those CLIs are installed and configured with the correct API keys/credentials; the skill does not declare or manage those credentials.
- Treat agent names and custom commands as executable input: if you pass untrusted strings as the agent argument they will be invoked as commands inside tmux. Avoid using this skill with untrusted inputs.
- Test in a safe environment first (a throwaway repo or container) and avoid running as a privileged user. If you want to limit risk, remove or alter the auto-approve flags and the hardcoded cd before using.
If you want me to, I can suggest a safer spawn.sh variant that omits auto-approve flags, validates inputs, and uses a configurable working directory instead of ~/clawd.Like a lobster shell, security has layers — review code before you run it.
Runtime requirements
🖥️ Clawdis
Binstmux
Install
Install tmux (brew)
Bins: tmux
brew install tmuxlatest
Tmux Agents
Run coding agents in persistent tmux sessions. They work in the background while you do other things.
Available Agents
☁️ Cloud Agents (API credits)
| Agent | Command | Best For |
|---|---|---|
| claude | Claude Code | Complex coding, refactoring, full projects |
| codex | OpenAI Codex | Quick edits, auto-approve mode |
| gemini | Google Gemini | Research, analysis, documentation |
🦙 Local Agents (FREE via Ollama)
| Agent | Command | Best For |
|---|---|---|
| ollama-claude | Claude Code + Ollama | Long experiments, heavy refactoring |
| ollama-codex | Codex + Ollama | Extended coding sessions |
Local agents use your Mac's GPU — no API costs, great for experimentation!
Quick Commands
Spawn a new agent session
./skills/tmux-agents/scripts/spawn.sh <name> <task> [agent]
# Cloud (uses API credits)
./skills/tmux-agents/scripts/spawn.sh fix-bug "Fix login validation" claude
./skills/tmux-agents/scripts/spawn.sh refactor "Refactor the auth module" codex
./skills/tmux-agents/scripts/spawn.sh research "Research caching strategies" gemini
# Local (FREE - uses Ollama)
./skills/tmux-agents/scripts/spawn.sh experiment "Rewrite entire test suite" ollama-claude
./skills/tmux-agents/scripts/spawn.sh big-refactor "Refactor all services" ollama-codex
List running sessions
tmux list-sessions
# or
./skills/tmux-agents/scripts/status.sh
Check on a session
./skills/tmux-agents/scripts/check.sh session-name
Attach to watch live
tmux attach -t session-name
# Detach with: Ctrl+B, then D
Send additional instructions
tmux send-keys -t session-name "additional instruction here" Enter
Kill a session when done
tmux kill-session -t session-name
When to Use Local vs Cloud
| Scenario | Recommendation |
|---|---|
| Quick fix, time-sensitive | ☁️ Cloud (faster) |
| Expensive task, budget matters | 🦙 Local |
| Long experiment, might fail | 🦙 Local |
| Production code review | ☁️ Cloud (smarter) |
| Learning/exploring | 🦙 Local |
| Heavy refactoring | 🦙 Local |
Parallel Agents
Run multiple agents simultaneously:
# Mix and match cloud + local
./scripts/spawn.sh backend "Implement user API" claude # Cloud
./scripts/spawn.sh frontend "Build login form" ollama-codex # Local
./scripts/spawn.sh docs "Write API documentation" gemini # Cloud
./scripts/spawn.sh tests "Write all unit tests" ollama-claude # Local
Check all at once:
./skills/tmux-agents/scripts/status.sh
Ollama Setup
Local agents require Ollama with a coding model:
# Pull recommended model
ollama pull glm-4.7-flash
# Configure tools (one-time)
ollama launch claude --model glm-4.7-flash --config
ollama launch codex --model glm-4.7-flash --config
Tips
- Sessions persist even if Clawdbot restarts
- Use local agents for risky/experimental work
- Use cloud for production-critical tasks
- Check
tmux lsto see all active work - Kill sessions when done to free resources
Comments
Loading comments...
