Skip to content

Dead --interactive flag on opencode run (advertised in --help, never read) + --mini is undocumented #35623

Description

@kaushikgopal

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

  1. Remove --interactive from run's option declarations (run.ts:236-241).
  2. 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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions