OpenCode 2.x review peers fail: `opencode run` no longer accepts --dir (or --variant)
With OpenCode 2.0.18, the OpenCode cross-model route in ce-doc-review fails before the model sees anything, because opencode run no longer accepts --dir:
ERROR Unrecognized flag: --dir in command opencode runThe worker then logs provider opencode produced no usable schema-shaped output; skipping fold-in, so the pass silently degrades to "no artifact" for every trio lens and the whole-doc sweep.
Reproduced on macOS with plugin 3.29.0 (latest release). Upstream main at 5e3aee1a29d2 has the same invocation in both adapters:
skills/ce-doc-review/scripts/cross-model-doc-review.shline 289skills/ce-code-review/scripts/cross-model-adversarial-review.shline 290
What changed in OpenCode 2.x
opencode run --help on 2.0.18 lists only these run flags: --standalone, --server, --continue, --session, --fork, --model ("in the format provider/model#variant"), --agent, --format, --file, --title, --thinking, --auto.
Two flags the adapters emit are gone:
--dir "$PEER_WORKDIR": always emitted, so every OpenCode run fails on 2.x.--variant "$_oc_effort": emitted whencross_model_effortis set. The variant now appears to go in the model string asprovider/model#variant.
Repro
opencode --version # 2.0.18
opencode run --dir /tmp --format json "hello"
# ERROR Unrecognized flag: --dir in command opencode runConfig that triggered it (.compound-engineering/config.local.yaml):
cross_model_peer: opencode
cross_model_model: openrouter/openrouter/autoPossible fix (untested)
Have the adapter cd into $PEER_WORKDIR before opencode run instead of passing --dir, and for 2.x fold the effort into --model as #<variant> instead of --variant. A version probe (opencode --version) could keep 1.x working.
Source: EveryInc/compound-engineering-plugin