Skip to content

Feature Request: Remember last used model/agent across sessions #10407

@nxxxsooo

Description

@nxxxsooo

Feature Request

Is your feature request related to a problem?
When starting OpenCode, it always uses the default model/agent from config, even if the user switched to a different model in the previous session. Users have to manually switch models every time they start a new session.

Describe the solution you'd like
OpenCode should remember the last used model/agent and restore it when starting a new session. This could be:

  1. A global preference stored in ~/.local/share/opencode/ (e.g., last_model.json)
  2. Or a config option like remember_last_model: true in opencode.json or oh-my-opencode.json

Describe alternatives you've considered
Currently users must manually edit config files to change the default model, which is inconvenient for those who frequently switch between models.

Additional context
This would greatly improve UX for users who:

  • Switch between local models (LMStudio) and cloud models
  • Use different models for different types of tasks
  • Want their workspace preferences to persist

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions