Motivation
Users who consistently prefer a specific provider/model (e.g. anthropic/claude-opus-4-6) or agent (build vs plan) have to pass --model or --agent on every command invocation of /opencode:review, /opencode:adversarial-review, and /opencode:rescue. The setup command already persists state like the review gate toggle via state.config in plugins/opencode/scripts/lib/state.mjs, so it's a natural place to store defaults.
Proposed UX
/opencode:setup --default-model anthropic/claude-opus-4-6 --default-agent build
/opencode:setup # displays current defaults
Defaults apply to all commands (task, review, adversarial-review) unless overridden per invocation with explicit --model / --agent.
Implementation sketch
handleSetup in opencode-companion.mjs accepts --default-model / --default-agent and writes them to state.config.defaults.
handleReview, handleAdversarialReview, handleTask read state.config.defaults and apply them when the caller hasn't passed the flag explicitly.
Upstream reference
Derived from openai/codex-plugin-cc#44.
Motivation
Users who consistently prefer a specific provider/model (e.g.
anthropic/claude-opus-4-6) or agent (buildvsplan) have to pass--modelor--agenton every command invocation of/opencode:review,/opencode:adversarial-review, and/opencode:rescue. The setup command already persists state like the review gate toggle viastate.configinplugins/opencode/scripts/lib/state.mjs, so it's a natural place to store defaults.Proposed UX
Defaults apply to all commands (
task,review,adversarial-review) unless overridden per invocation with explicit--model/--agent.Implementation sketch
handleSetupinopencode-companion.mjsaccepts--default-model/--default-agentand writes them tostate.config.defaults.handleReview,handleAdversarialReview,handleTaskreadstate.config.defaultsand apply them when the caller hasn't passed the flag explicitly.Upstream reference
Derived from openai/codex-plugin-cc#44.