Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
This was referenced Oct 7, 2026
Author
|
Closing: this is v1-only and v1 only takes critical fixes now (see #53806); v2's mini interface already keeps --model on resume. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue for this PR
Closes #53806
Type of change
What does this PR do?
When the prompt syncs agent/model from the last user message of a resumed session, it already skips the agent if
--agentwas passed, but it always applied the message's model. Soopencode --session <id> --model x/yopened with the session's old model and the next prompt went there.The fix applies the same rule to the model: if
--modelwas passed, the message's model (and its variant) are not applied. Without--modelnothing changes.Use case: NeuroSquad runs OpenCode in a terminal and relaunches it with
--session+--modelwhen the user switches models; today that needs a plugin that rewrites the model on outgoing messages.This PR was prepared with help from an AI coding agent; I reviewed the change and the tests.
How did you verify your code works?
packages/tui/test/session-model-arg.test.tsx: starts the TUI against a fake server with a session whose last message usedalpha/model-a; with--model beta/model-bthe footer shows model-b (fails before the fix), without--modelit still shows model-a.bun testinpackages/tui(the only failure,runtime.test.tsx"abbreviates paths within home boundaries", fails ondevtoo on Windows),bun run typecheck, oxlint and prettier on the changed files.src/index.tsfrom this branch in a pty against a local OpenAI-compatible stub with two providers.run --model fakea/macreated the session, then--session <id> --model fakeb/mb: ondevthe footer showed model A and the request went toma; with this change the footer shows model B and the request goes tomb.Screenshots / recordings
Not a visual change (only which model is selected).
Checklist