with one click
opencode
// Delegate coding tasks to the OpenCode CLI for feature work, refactoring, PR review, and autonomous-style runs. Requires opencode installed where the agent can execute shell commands.
// Delegate coding tasks to the OpenCode CLI for feature work, refactoring, PR review, and autonomous-style runs. Requires opencode installed where the agent can execute shell commands.
| name | opencode |
| description | Delegate coding tasks to the OpenCode CLI for feature work, refactoring, PR review, and autonomous-style runs. Requires opencode installed where the agent can execute shell commands. |
| version | 1.0.0 |
| license | MIT |
| metadata | {"clawcode":{"tags":["Coding-Agent","OpenCode","CLI","Refactoring"],"related_skills":["coding-standards","python-patterns","codex"]}} |
Use OpenCode as an external coding agent when the user wants OpenCode specifically.
Do not confuse these entry points (they are not interchangeable):
| Entry | Role |
|---|---|
/opencode-cli (TUI slash) | One-shot probe or command via opencode_cli_bridge: merged stdout/stderr, not a PTY session and not multi-turn TUI control. Default args often --version. |
bash | One-shot shell in agent turns, e.g. opencode run 'โฆ'. |
terminal + process (Agent tools) | Multi-turn driving of a background shell/OpenCode TUI: terminal with background=true (and pty=true on POSIX with clawcode[terminal-pty]), then process for poll / submit / kill. Requires CLAWCODE_TERMINAL_ENV=local for full PTY on Linux/macOS; Windows host is limitedโuse WSL or Linux for interactive TUI automation. |
Optional: pip install 'clawcode[terminal-pty]' for ptyprocess on POSIX.
opencode.opencode run '...' via bash in the project workspace./opencode-cli (default opencode --version) after /claw; same terminal stack as /claude-cli (CLAWCODE_TERMINAL_ENV / TERMINAL_ENV).npm i -g opencode-ai@latest or vendor instructions).opencode auth login or provider env vars (see OpenCode docs).opencode auth list should list at least one provider when run in the same environment as the agent.| Goal | What to use |
|---|---|
| Quick probe (version, install check) | /opencode-cli onlyโsingle run, not multi-turn. Same Claw gate as /claude-cli. |
| Run a command in agent turns | bash: e.g. opencode run 'your task' with working_directory set to the repo root. |
| Docker/SSH terminal backend | Same as bash: settings.shell.use_environments_backend and CLAWCODE_TERMINAL_*; ensure the image or remote has opencode on PATH. |
| Interactive OpenCode TUI (agent-driven) | terminal (background=true, pty=true where supported) + process (poll / submit / โฆ). Non-local backends: log-polled background only (no stdin). Optional check_interval on terminal schedules completion notifications in the TUI (see CLAW_SUPPORT_MAP.md). |
Use opencode run for bounded work:
opencode run 'Add retry logic to API calls and update tests'
Attach files with -f when needed. Use --thinking, --model, etc. per OpenCode CLI help.
If which opencode differs between environments, use an absolute path in the bash command:
"$HOME/.opencode/bin/opencode" run '...'
opencode still benefits from a real user terminal for some UX; bash alone does not replace PTY driving.opencode exit codes and stderr: see bash tool output; /opencode-cli shows stdout/stderr blocks in the chat UI./exit in OpenCode TUI (invalid per OpenCode UX); prefer Ctrl+C in a real terminal session.opencode --version
opencode run 'Respond with exactly: OPENCODE_SMOKE_OK'
opencode run for automation./opencode-cli only for quick checks or demos; heavy work goes through bash with explicit commands.DeepNote knowledge base: persistent interlinked markdown wiki with ingest, query, lint, link graph and history.
Delegate coding tasks to the OpenAI Codex CLI for features, refactoring, PR reviews, and batch fixes. Requires the codex CLI and typically a git repository.