Domain

/cli-agents

Run external CLI agents (Gemini, Cursor, Codex, Kiro, Claude) via cmux panes. Workers split in current workspace. Audits/research open in a new named workspace. All agents are interactive and visible.

$ golems-cli skills install cli-agents
Good
100% best pass rate
13 assertions
3 evals

Updated 2 weeks ago

External AI agents spawned as interactive cmux panes. Two patterns based on intent:

IntentWhereWhy
Worker (code, implementation, collab)Split in current workspaceVisible side-by-side, easy to monitor
Audit/Research (read-only, analysis)New workspace, namedDoesn't clutter working view, find in sidebar

Spawning Workers (split in current workspace)

# Split right, label it, send the agent command
SURFACE=$(cmux new-split right | awk '{print $2}')
cmux rename-tab --surface "$SURFACE" "Agent Label"
cmux send --surface "$SURFACE" "cd ~/Gits/TARGET_REPO && AGENT_CMD"
cmux send-key --surface "$SURFACE" Return

Agent commands

# Claude (use repoGolem function or raw CLI)
"claude -s 'your prompt here'"           # -s = dangerously-skip-permissions
 
# Cursor (work mode — modifies files)
"cursor agent -p --model gpt-5.2-codex-xhigh --trust 'your prompt here'"
 
# Codex (work mode)
"codex --full-auto 'your prompt here'"
 
# Gemini (text-only, good for research)
"gemini 'your prompt here'"
 
# Kiro (text-only)
"kiro-cli chat --no-interactive 'your prompt here'"

Example: 3 parallel workers

# Launch sequentially (1Password biometric needs ~2s between each)
for repo in brainlayer golems voicelayer; do
  SURFACE=$(cmux new-split right | awk '{print $2}')
  cmux rename-tab --surface "$SURFACE" "$repo"
  cmux send --surface "$SURFACE" "cd ~/Gits/$repo && claude -s 'your task here'"
  cmux send-key --surface "$SURFACE" Return
  sleep 3  # Wait for Touch ID
done

Spawning Audits/Research (new workspace)

# New workspace so it doesn't clutter your working view
cmux new-workspace
SURFACE=$(cmux list-pane-surfaces --pane "$(cmux list-panes | tail -1 | grep -oE 'pane:[0-9]+')" | grep -oE 'surface:[0-9]+' | head -1)
cmux rename-tab --surface "$SURFACE" "Audit: reponame"
cmux send --surface "$SURFACE" "cd ~/Gits/TARGET_REPO && AGENT_CMD"
cmux send-key --surface "$SURFACE" Return

Example: Cursor audit in separate workspace

cmux new-workspace
# Get the new surface
SURFACE=$(cmux list-pane-surfaces --pane "$(cmux list-panes | tail -1 | grep -oE 'pane:[0-9]+')" | grep -oE 'surface:[0-9]+' | head -1)
cmux rename-tab --surface "$SURFACE" "Audit: golems"
cmux send --surface "$SURFACE" "cd ~/Gits/golems && cursor agent -p --output-format text --model gpt-5.2-codex-xhigh --trust 'Audit recent changes. Check: code quality, bugs, missing tests, security, dead code. Be harsh.'"
cmux send-key --surface "$SURFACE" Return

Example: Multi-agent audit wave (3 perspectives)

for i in 1 2 3; do
  cmux new-workspace
  SURFACE=$(cmux list-pane-surfaces --pane "$(cmux list-panes | tail -1 | grep -oE 'pane:[0-9]+')" | grep -oE 'surface:[0-9]+' | head -1)
  cmux rename-tab --surface "$SURFACE" "Audit $i: golems"
  cmux send --surface "$SURFACE" "cd ~/Gits/golems && cursor agent -p --output-format text --model gpt-5.2-codex-xhigh --trust 'ANGLE $i PROMPT'"
  cmux send-key --surface "$SURFACE" Return
  sleep 3
done

Monitoring Agents

# Check what an agent is doing
cmux read-screen --surface surface:N --lines 8
 
# Check all agents at once
bash ~/.claude/commands/cli-agents/scripts/agent-status.sh
 
# Send follow-up to an agent
cmux send --surface surface:N "additional instructions"
cmux send-key --surface surface:N Return