fix(ui): avoid resending stale session agent/model selections #416#442
Open
fastknifes wants to merge 2 commits into
Open
fix(ui): avoid resending stale session agent/model selections #416#442fastknifes wants to merge 2 commits into
fastknifes wants to merge 2 commits into
Conversation
Track explicit session agent/model selections separately from server-observed session display state so prompts can distinguish user intent from cached metadata. This prepares the UI to avoid resending stale session agent/model values after subagent activity changes the server-side session state. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Use the override state when sending prompts, commands, and shell requests so cached session metadata is not resent as user intent after the server changes session agent/model state. Seed overrides for newly created sessions, clear them after successful consumption or authoritative message reloads, and keep the existing session guard for shell execution. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
69239e5 to
a560a83
Compare
Author
Collaborator
|
@fastknifes - I don't think this is the correct behavior. Can you check how the OpenCode TUI manages the models. AFAIK, the user selected model is sent every time a prompt is sent to the server. |
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.
Summary
Fixes #416
Problem
Previously, prompt and command requests reused
session.agentandsession.modeldirectly. Those fields represent the latest known server/display state, not necessarily the user's current intent.After subagent/session activity changed the authoritative server state, the client could keep sending outdated agent/model values with later requests, causing model lookup failures such as "Model not found".
Changes
session-overridesstore for explicit agent/model selections.Validation
rtk npm build:uicompleted successfully.prompt_asyncrequest payloads include structured agent/model only when explicitly selected.Notes
The existing Vite warning from
virtua/lib/solid/index.jsxis unrelated to this change and remains a third-party dependency warning.