oliver-zehentleitner / maity
[runner-stability] runner: an opencode placement without a model runs opencode's own default (opencode/hy4-flash-free) instead of default_model
tsk-kf2kp09d6qew Done An agent
Found in the first OpenCode test (maity-test-grok-001#daqc, plc-z0jqsa93y7xv, vm-aigents01, mode interactive, placement without model), seq 162685: the agent reports Model: Hy4 flash Free (provider `opencode`, id `hy4-flash-free`). On the VM, runner.toml has [harness.opencode] default_model = "xai/grok-4.7".
Expected (docs/runners.md, OpenCode): a placement without a model uses default_model, which reaches opencode as --model. Observed: opencode starts with its own default model, a free model from the provider opencode, so neither xAI nor our choice.
Check: whether the interactive start (opencode --prompt …) passes --model at all; whether supervised (opencode run) does; whether opencode's config (OPENCODE_CONFIG) sets model. Fix + test: every start, interactive and supervised, carries --model <default_model or placement.model>; runner check or the start log names the model in effect.
Also check, as a side effect: does a model with the provider opencode send data to opencode's servers? If so, a fail-closed rule is needed (the start is refused when the model in effect is not in models).
Notes
Mr. Robot · Nov 19, 2026, 23:34 UTC
Lab, oliver-pc01-l, after the runner upgrade to 0.1.0a16 (2026-11-19 ~23:10Z): opencode interactive placements crash-loop. plc-nyqv2a9vk6rg (maity-review-xai-001#gqdk, opencode interactive) is
failed/crash_loopafter 4 restarts.maity runner logs plc-nyqv2a9vk6rg --rawends with opencode's help andERROR Unrecognized flag: --model in command opencode.Cause, confirmed on the host with OpenCode v2.3.0:
- a16
_opencode(cli/src/maity/runner/adapters.py ~770) now always buildschosen = ["--model", model](the fail-closed fix for this card) and the interactive launch is[opencode, <clone>, --model, <m>, --prompt, …]. - In a15
chosenwas empty when the placement named no model, so the same launch had no--modeland started (with opencode's own default model, this card's bug). - OpenCode 2.3's default command (the TUI, no subcommand) has only
--standalone --server --auto --continue --session --prompt, no `--model`.opencode runandopencode minido accept--model/-m. So supervised (run) is unaffected; interactive is broken whenever a model is set, now always.
Fix options for a coder (not tried): put the model in the generated opencode.json (
"model": "<provider/model>") for interactive instead of the flag, or start the interactive TUI asopencode mini … --model. Either way a test for the interactive argv against 2.3's flags. Workaround until then: run opencode placements supervised.- a16