You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
Document the two prerequisites for running opencode under the
dispatcher: (1) `opencode providers login` to set up credentials, and
(2) explicit `AGENT_DEV_MODEL` / `AGENT_REVIEW_MODEL` in
`autonomous.conf` (opencode is provider-agnostic — no default model).
Also flag that `AGENT_PERMISSION_MODE=bypassPermissions` isn't yet wired
to opencode's `--dangerously-skip-permissions` flag (same gap as codex).
## Why
After #89 added first-class opencode support, a user reading the
README's "Full support" badge and setting `AGENT_CMD=opencode` would get
a silently stalled pipeline: opencode enters a session but produces no
output without credentials and an explicit model. Spelling out the
prereqs up-front prevents the foot-gun.
## What changed
- **README → Supported Agent CLIs**: opencode row now has a † footnote
covering auth + explicit model + the bypassPermissions gap.
- **README → variable table**: the `AGENT_CMD` row gets an inline
pointer to the footnote so users editing `autonomous.conf` see the
warning without scrolling.
- **`autonomous.conf.example`**: the `AGENT_CMD` comment and the
`AGENT_DEV_MODEL` / `AGENT_REVIEW_MODEL` comments now explicitly call
out that empty model values are valid for claude/codex but invalid for
opencode.
## Test Plan
- [x] No code changes; `bash -n` clean on `autonomous.conf.example`
- [ ] CI checks pass
## Checklist
- [x] Docs only
- [x] Build/tests not affected
Copy file name to clipboardExpand all lines: README.md
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -168,7 +168,7 @@ The file is a bash script that's `source`d at every dispatcher tick and wrapper
168
168
|`REPO`| Yes |`owner/repo-name`| The GitHub repo the pipeline watches. |
169
169
|`REPO_OWNER`, `REPO_NAME`| Yes | Split form of `REPO`| Used for App-token scoping. |
170
170
|`PROJECT_DIR`| Yes | Absolute path to the project root on the dispatcher box | Where the agent runs. |
171
-
|`AGENT_CMD`| No (default `claude`) |`claude`, `codex`, `kiro`, or `opencode`| The CLI used to spawn dev/review agents. Other CLIs work via the generic `<cli> -p <prompt>` fallback. See the Supported Agent CLIs table for resume semantics per CLI. |
171
+
|`AGENT_CMD`| No (default `claude`) |`claude`, `codex`, `kiro`, or `opencode`| The CLI used to spawn dev/review agents. Other CLIs work via the generic `<cli> -p <prompt>` fallback. See the Supported Agent CLIs table for resume semantics per CLI. **`opencode` requires `opencode providers login` and explicit `AGENT_DEV_MODEL`/`AGENT_REVIEW_MODEL` values** — see the table footnote. |
172
172
|`AGENT_DEV_MODEL`, `AGENT_REVIEW_MODEL`| No (default empty / `sonnet`) | Model name passed to the agent CLI | Empty = let the CLI pick. The review model defaults to `sonnet` to keep review costs predictable. |
173
173
|`AGENT_PERMISSION_MODE`| No (default `auto`) |`auto`, `plan`, or `bypassPermissions`|`bypassPermissions` grants the agent unrestricted shell access — only use in a trusted sandbox. |
174
174
|`AGENT_TIMEOUT`| No (default `4h`) | coreutils `timeout` units (e.g. `30m`, `2h`, `1d`) | Wall-clock cap on each agent invocation. Prevents hung CLI processes (stale `--resume`, MCP stdio deadlock) from monopolizing wrapper PID slots. |
@@ -373,7 +373,17 @@ The dispatcher is an [OpenClaw](https://github.com/OpenClaw/OpenClaw) skill that
373
373
| Kiro CLI |`kiro-cli`|`chat --no-interactive [--agent <name>]`| (falls back to new) | Basic support |
| opencode |`opencode`|`run --format json [PROMPT]`|`run --session <sessionID>` (captured from JSON stream) | Full support |
376
+
| opencode |`opencode`|`run --format json [PROMPT]`|`run --session <sessionID>` (captured from JSON stream) | Full support † |
377
+
378
+
† **opencode prerequisites.** Unlike Claude Code (Anthropic-bound) or Codex CLI (OpenAI-bound), opencode is provider-agnostic — it has no default model, and no built-in credentials. Before setting `AGENT_CMD=opencode`:
379
+
380
+
1.**Authenticate a provider.** Run `opencode providers login` once on the dispatcher box (or every box that runs the wrapper if `EXECUTION_BACKEND=remote-aws-ssm`). Without this, the agent enters a session but produces no output and the pipeline silently makes no progress.
381
+
2.**Set an explicit model.** opencode's `--model` argument expects `provider/model` form (e.g. `anthropic/claude-sonnet-4-6`, `openai/gpt-5.4`). The wrapper forwards `AGENT_DEV_MODEL` / `AGENT_REVIEW_MODEL` from `autonomous.conf`; leave them empty and opencode will either error out or wait for interactive selection (which never arrives in headless mode). Recommended:
382
+
```bash
383
+
AGENT_DEV_MODEL="anthropic/claude-sonnet-4-6"
384
+
AGENT_REVIEW_MODEL="anthropic/claude-haiku-4-5"
385
+
```
386
+
3.**`AGENT_PERMISSION_MODE=bypassPermissions` is not yet wired** to opencode's `--dangerously-skip-permissions` flag (same gap as the codex branch — tracked as a follow-up). For now, run opencode in a sandboxed environment where the missing permission flag is acceptable.
377
387
378
388
Configure via `AGENT_CMD` in `scripts/autonomous.conf`. The `claude`, `codex`, `kiro`, and `opencode` rows have explicit branches in `scripts/lib-agent.sh`; the others run through the generic `<cli> -p <prompt>` fallback. Any CLI not listed should still work if it accepts a `-p <prompt>` non-interactive flag — the abstraction layer is intentionally permissive.
0 commit comments