Skip to content

[BUG]: Model from previous session overrides current config when continuing a session #26351

Closed as not planned

Description

@st3fk3

Description

When continuing an old session, the model is restored from the last user message instead of the current agent config.

Changing the model config between sessions has no effect - the old model is still used.

  • The orchestrator uses the stale model for API calls
  • Subagents use the correct config model (they bypass the model store)
  • This causes model inconsistency within a single session (on old session continue)

Expected behavior

  • Configured model should be the active model when starting or continuing any session
  • Session history should restore the agent, not the model

Why this is safe

  • Switching models mid-session is safe
  • If there are any issues that are result of model changing, it should be kept in mind when changing model config
  • Config is the user's current intent and should take precedence over historical state

Plugins

oh-my-opencode-slim

OpenCode version

v1.14.41

Steps to reproduce

  1. Use opencode with model A
  2. Send a few messages in a session
  3. Close opencode
  4. Change config to model B
  5. Reopen opencode, continue the old session
  6. The orchestrator uses model A instead of model B

Screenshot and/or share link

No response

Operating System

Fedora Linux 43 (KDE Plasma edition)

Terminal

Alacritty

Activity

  1. github-actions commented on May 8, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. github-actions commented on Jul 9, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions