Skip to content

UX: agent model config override — sticky last-used model survives session reload; wizard should warn + document workaround #23

@BaseInfinity

Description

@BaseInfinity

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

  1. 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."
  2. SETUP profile docs: add the same note to the Zen profile recipe (and any profile that pins agent models).
  3. 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)

  1. Open OpenCode after install.
  2. For each primary agent (Tab to cycle), type /models and select the configured model explicitly.
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions