ACP loadSessionMode doesn't set model and mode #7078

Closed
opened 2026-02-16 18:06:07 -05:00 by yindo · 1 comment
Owner

Originally created by @noamzbr on GitHub (Jan 21, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

First of all, sorry.. I've implemented a wrong fix to https://github.com/anomalyco/opencode/issues/7804 in https://github.com/anomalyco/opencode/pull/7809.

That fix correctly retrieves the model and mode from the last message, and returns them in the load response, but it fails to actually set the model and mode in the session - resulting in the session still using the default model.

What needs to be done - use setModel and setMode right after they are retrieved from the message

Plugins

No response

OpenCode version

v1.1.26

Steps to reproduce

  1. Start a session, set model to non-default, send a message
  2. Load the session.
  3. Load session will return (correctly) non-default model in response
  4. Send a message
  5. Message is sent to default model

Screenshot and/or share link

No response

Operating System

macOS 15.6.1

Terminal

Ghostty

Originally created by @noamzbr on GitHub (Jan 21, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description First of all, sorry.. I've implemented a wrong fix to https://github.com/anomalyco/opencode/issues/7804 in https://github.com/anomalyco/opencode/pull/7809. That fix correctly retrieves the model and mode from the last message, and returns them in the load response, but it fails to actually set the model and mode in the session - resulting in the session still using the default model. What needs to be done - use setModel and setMode right after they are retrieved from the message ### Plugins _No response_ ### OpenCode version v1.1.26 ### Steps to reproduce 1. Start a session, set model to non-default, send a message 2. Load the session. 3. Load session will return (correctly) non-default model in response 4. Send a message 5. Message is sent to default model ### Screenshot and/or share link _No response_ ### Operating System macOS 15.6.1 ### Terminal Ghostty
yindo added the bug label 2026-02-16 18:06:07 -05:00
yindo closed this issue 2026-02-16 18:06:07 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 21, 2026):

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

  • #9824: Model selection in UI is ignored - reverts to default model instead

Both issues describe problems with model selection not being persisted during session operations. Feel free to ignore if this doesn't address your specific case.

@github-actions[bot] commented on GitHub (Jan 21, 2026): This issue might be a duplicate of existing issues. Please check: - #9824: Model selection in UI is ignored - reverts to default model instead Both issues describe problems with model selection not being persisted during session operations. Feel free to ignore if this doesn't address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7078