Skip to content

Commit efd876f

Browse files
dvdksnclaude
andcommitted
Document how to pass CLI options to OpenCode agent
The OpenCode sandbox page was missing the "Pass options at runtime" section that other agent pages include, showing how to forward CLI options using the `--` separator. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e4b70a5 commit efd876f

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

content/manuals/ai/sandboxes/agents/opencode.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,20 @@ OpenCode uses a TUI interface and doesn't require extensive configuration
6464
files. The agent prompts you to select a provider when it starts, and you can
6565
switch providers during a session.
6666

67+
### Pass options at runtime
68+
69+
Pass OpenCode CLI options after `--`:
70+
71+
```console
72+
$ sbx run opencode --name <sandbox-name> -- <opencode-options>
73+
```
74+
75+
For example, to resume an existing session in a named sandbox:
76+
77+
```console
78+
$ sbx run <sandbox-name> -- -s <session-id>
79+
```
80+
6781
### TUI mode
6882

6983
OpenCode launches in TUI mode by default. The interface shows:

0 commit comments

Comments
 (0)