Skip to content

tui: switching from Build to Plan picks up a model selected in another session #63084

Closed as duplicate

Description

@Woo-kk

Summary

Switching agents in an existing TUI session can silently change its model to one selected in another session. Returning to the original session initially shows its original model, so the unexpected change only becomes visible after switching agents and is easy to miss before submitting a prompt.

Environment

  • opencode version: v2.2.6
  • OS: macOS / Darwin 25.6.0, arm64
  • Terminal: Ghostty (TERM=xterm-256color, COLORTERM=truecolor)
  • Shell: zsh
  • Install/channel: Version reports v2.2.6 without a prerelease suffix; installation method not collected.
  • Active plugins: No explicit plugin entries in the inspected global config. Local plugin file present: ~/.config/opencode/plugins/deepseek-search.ts; runtime activation not verified. Project-specific configuration at the original reproduction location has not been inspected.

Reproduction

  1. Run opencode in a directory to open the TUI. In the original session (A), the input composer shows deepseek-flash.
  2. Click the + button at the top to create a new session (B).
  3. In session B, select gpt-6-astra.
  4. Return to session A. Its composer still shows deepseek-flash, as expected.
  5. Switch from Build to Plan in session A.
  6. Observe that session A's composer now shows gpt-6-astra, despite not explicitly selecting that model in session A.

Expected Behavior

Selecting a model in session B should not implicitly determine the model used when switching agents in session A.

Explicit agent-specific model configurations or selections can be respected, but an agent without such a selection should keep the current session's model rather than silently inherit the most recently selected model from another session.

Actual Behavior

Session A initially retains deepseek-flash when revisited, but switching agents changes the displayed model to gpt-6-astra, which was selected in session B. This makes model selection within an existing session unpredictable across agent switches.

Additional Context

Activity

  1. opencodejr commented on Nov 10, 2026

    @opencodejr

    Thanks for the detailed write-up and repro steps!

    I think this is a duplicate of #54375. Its discussion covers this exact case: an agent you haven't used yet in the current session falls back to the model picked most recently in any tab. That's how Plan in session A picks up the model you chose in session B. A contributor reproduced it there on dev, and the reference branch linked in that issue keeps the tab's own model when you switch agents.

    Possible duplicates and related issues, ordered from most to least likely:

    If you add a 👍 or your scenario to #54375, that helps maintainers see how many people this affects. The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.

  2. Woo-kk commented on Nov 10, 2026

    @Woo-kk
    Author

    Thanks for pointing me to #54375. I read through it and can confirm that I’m seeing the same issue. I’m closing this as a duplicate.

  3. opencodejr commented on Nov 10, 2026

    @opencodejr

    Thanks for checking and confirming! A 👍 or a short note about your session A / session B case on #54375 helps maintainers see how many people this affects.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions