Summary
opencode run -i / --interactive is declared and shown in --help, but its value is never read (so it's a no-op). --mini on the other hand is undocumented and would be super useful!
The problem
opencode run --help advertises:
-i, --interactive run in direct interactive split-footer mode [boolean] [default: false]
But the handler reads only args.mini, not args.interactive:
// packages/opencode/src/cli/cmd/run.ts:273
const interactive = args.mini
args.interactive has zero reads in non-test source. So opencode run -i "..." takes the non-interactive path: sends the prompt, streams the answer, exits — identical to opencode run "...". The flag is a no-op.
This is additionally confusing because run is by design meant to be headless (?) There's an explicit guard rejecting --mini under the run subcommand:
// packages/opencode/src/cli/cmd/run.ts:296
if (interactive && args._?.[0] !== "mini") {
die("--mini must be used without the run subcommand")
}
The actual command surface is:
| Command |
Behavior |
opencode run "xxx" |
headless; answers; exits |
opencode --mini "xxx" |
split-footer; auto-submits; stays interactive |
opencode --prompt "xxx" |
full TUI; auto-submits; stays interactive |
Suggested changes
- Remove
--interactive from run's option declarations (run.ts:236-241).
- Document
--mini in the CLI docs (https://opencode.ai/docs/cli); it's the only way to launch the interactive split-footer with an auto-submitted prompt — genuinely useful and not advertised.
Environment
- opencode 1.17.14
- confirmed against
dev branch: packages/opencode/src/cli/cmd/run.ts:236-241, 273, 296
Summary
opencode run -i / --interactiveis declared and shown in--help, but its value is never read (so it's a no-op).--minion the other hand is undocumented and would be super useful!The problem
opencode run --helpadvertises:But the handler reads only
args.mini, notargs.interactive:args.interactivehas zero reads in non-test source. Soopencode run -i "..."takes the non-interactive path: sends the prompt, streams the answer, exits — identical toopencode run "...". The flag is a no-op.This is additionally confusing because
runis by design meant to be headless (?) There's an explicit guard rejecting--miniunder therunsubcommand:The actual command surface is:
opencode run "xxx"opencode --mini "xxx"opencode --prompt "xxx"Suggested changes
--interactivefromrun's option declarations (run.ts:236-241).--miniin the CLI docs (https://opencode.ai/docs/cli); it's the only way to launch the interactive split-footer with an auto-submitted prompt — genuinely useful and not advertised.Environment
devbranch:packages/opencode/src/cli/cmd/run.ts:236-241, 273, 296