Problem
When opencode.json configures agent.build.model (or any agent model), OpenCode's last-used model per agent overrides the config default on session resume/reload. The config is loaded correctly — opencode debug config shows the right model — but the agent starts on whatever model was manually selected last, not the one in config.
Concrete case: set up the Zen fallback profile (wizard install + hand-written opencode.json with agent.build.model = opencode/claude-sonnet-4-6). On every session open, Build agent shows the previously-selected model (in this case Opus 4.8 max from the setup session) instead of Sonnet 4.6. User has to manually /models → pick the right model every time until the sticky selection matches config.
Root cause
This is OpenCode core behavior (anomalyco/opencode), not the wizard. The wizard can't fix it. But the wizard's post-install output and docs say nothing about it, so users hit it silently and assume the config is wrong.
What the wizard can do
- Post-install note: add a line to the install summary — something like: "Note: OpenCode persists the last-used model per agent. On first open, use
/models to select your configured model; it sticks after that."
- SETUP profile docs: add the same note to the Zen profile recipe (and any profile that pins agent models).
- Stretch: a
pick --verify or opencode debug config step in the post-install flow that reminds users to confirm the active model matches config.
Workaround (for docs)
- Open OpenCode after install.
- For each primary agent (Tab to cycle), type
/models and select the configured model explicitly.
- Done — OpenCode now remembers it per-agent and it matches config on future sessions.
Environment
- OpenCode: 1.16.2
- opencode-sdlc-wizard: 0.13.4
- macOS 15.1 arm64
Problem
When
opencode.jsonconfiguresagent.build.model(or any agent model), OpenCode's last-used model per agent overrides the config default on session resume/reload. The config is loaded correctly —opencode debug configshows the right model — but the agent starts on whatever model was manually selected last, not the one in config.Concrete case: set up the Zen fallback profile (wizard install + hand-written
opencode.jsonwithagent.build.model = opencode/claude-sonnet-4-6). On every session open, Build agent shows the previously-selected model (in this case Opus 4.8 max from the setup session) instead of Sonnet 4.6. User has to manually/models→ pick the right model every time until the sticky selection matches config.Root cause
This is OpenCode core behavior (
anomalyco/opencode), not the wizard. The wizard can't fix it. But the wizard's post-install output and docs say nothing about it, so users hit it silently and assume the config is wrong.What the wizard can do
/modelsto select your configured model; it sticks after that."pick --verifyoropencode debug configstep in the post-install flow that reminds users to confirm the active model matches config.Workaround (for docs)
/modelsand select the configured model explicitly.Environment