GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(app): keep selected model across new sessions by anduimagui · Pull Request #17190 · anomalyco/opencode

Conversation

@anduimagui

@anduimagui anduimagui commented Mar 12, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Issue for this PR

Closes #4930

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Desktop currently restores model and agent state for existing sessions, but starting a new session in the same project can still reset the selected model back to the agent default. That means a manual model choice is not sticky across later new sessions.

This change stores the app's selected model in workspace-scoped persistence and updates the new-session reset path to only restore agent defaults when there is no current model selection to keep. Existing session restore behavior stays the same, while new sessions in the same project keep the selected model.

Related context: #12582 fixed CLI fallback to recent models, but it did not change the desktop app's new-session behavior.

How did you verify your code works?

I added a unit test covering the new-session reset path so it does not overwrite an existing selected model.

I verified locally with:

  • bun test --preload ./happydom.ts ./src/pages/session/session-model-helpers.test.ts
  • bun typecheck

Screenshots / recordings

Not included. This changes state persistence behavior rather than visible UI.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
anduimagui
fix(app): keep selected model across new sessions
10c11fc
@anduimagui
anduimagui requested a review from adamdotdevin as a code owner March 12, 2026 14:09
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Mar 12, 2026
Andrew Maguire
Merge branch 'dev' into opencode/playful-island
bc3f6e4
@github-actions

github-actions Bot commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Found a potentially related PR:

#14682: fix(tui): retain model and agent selection when switching sessions

This PR appears related as it addresses retaining model and agent selection, but it's specifically for the TUI (text user interface), while PR #17190 is for the desktop app. Worth checking if there's any shared logic or if they're addressing the same underlying issue from different interfaces.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Mar 12, 2026
@github-actions

github-actions Bot commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot mentioned this pull request Apr 3, 2026
fix(tui): retain current model and agent selection on session switch … #20925
Closed
6 tasks
@opencode-agent
opencode-agent Bot force-pushed the dev branch from 2f2ed11 to 9f201d6 Compare April 16, 2026 21:55
@github-actions github-actions Bot mentioned this pull request Apr 26, 2026
feat: toggle to keep model/agent when switching sessions #24508
Closed
4 tasks done
@github-actions

github-actions Bot commented May 12, 2026

Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot closed this May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@adamdotdevin adamdotdevin Awaiting requested review from adamdotdevin

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Feature Request: Retain current model and agent selection when switching sessions

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@anduimagui
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.