ACP loadSessionMode doesn't restore persisted model/agent from session messages #4743

Closed
opened 2026-02-16 17:45:14 -05:00 by yindo · 1 comment
Owner

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

Originally assigned to: @rekram1-node on GitHub.

Description

When loading an existing session via ACP, loadSessionMode() always uses defaultModel() instead of reading the model/agent from the last user message like the TUI does (prompt/index.tsx:145-148).

This causes the model/mode selection to reset to defaults when reloading a session through ACP clients.

Plugins

No response

OpenCode version

1.1.6

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

macOS 15.6.1

Terminal

Ghostty

Originally created by @noamzbr on GitHub (Jan 11, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description When loading an existing session via ACP, loadSessionMode() always uses defaultModel() instead of reading the model/agent from the last user message like the TUI does (prompt/index.tsx:145-148). This causes the model/mode selection to reset to defaults when reloading a session through ACP clients. ### Plugins _No response_ ### OpenCode version 1.1.6 ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System macOS 15.6.1 ### Terminal Ghostty
yindo added the bug label 2026-02-16 17:45:14 -05:00
yindo closed this issue 2026-02-16 17:45:14 -05:00
Author
Owner

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

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

  • #4930: Retain current model and agent selection when switching sessions (related feature request about session model/agent persistence)
  • #4344: Selected model for agent in TUI doesn't stick between Agent Alternation (related model selection persistence issue)
  • #5000: opencode --continue doesn't restore state of previous subagent pane (related to state restoration)

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 11, 2026): This issue might be a duplicate of existing issues. Please check: - #4930: Retain current model and agent selection when switching sessions (related feature request about session model/agent persistence) - #4344: Selected model for agent in TUI doesn't stick between Agent Alternation (related model selection persistence issue) - #5000: opencode --continue doesn't restore state of previous subagent pane (related to state restoration) Feel free to ignore if none of these 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#4743