Run OpenCode AI coding agent on OpenClaw without token waste. Dispatch tasks, get results, build faster.
Four powerful methods for different scenarios
Dispatch tasks without wasting tokens on status checks. Results saved to JSON.
Use opencode/glm-5-free or minimax-m2.5-free. No API costs.
Combine with ralph-team for complex projects with parallel execution.
Tasks run in background. Continue chatting while code gets written.
Three ways to use OpenCode on OpenClaw
# Zero polling - save result to JSON
~/.openclaw/scripts/dispatch-opencode.sh \
-p "implement auth API" \
-n "auth-api" \
-w "/project"
# With pseudo-terminal
bash pty:true workdir:/project \
command:"opencode run 'task'"
# Multi-task with dependencies
TM="team-tasks"
$TM init project -m dag
$TM add project "task1"
$TM add project "task2" -d "task1"
Install OpenCode and start building faster with AI assistance.
View on GitHub