fix(desktop): Claude model picks + agent avatars after restart - #2701
Open
Chessing234 wants to merge 4 commits into
Open
fix(desktop): Claude model picks + agent avatars after restart#2701Chessing234 wants to merge 4 commits into
Chessing234 wants to merge 4 commits into
Conversation
|
Heads up: #2695 (opened earlier today, also fixing #2692) carries this same fix —
No attachment to whose lands — happy to close #2695 if you'd rather fold the const + readiness dedup in here (the avatar fix bundled in this PR is orthogonal either way), or rebase mine if you prefer to split. Maintainers' call. |
This was referenced Jul 25, 2026
Contributor
Author
wpfleger96
pushed a commit
that referenced
this pull request
Jul 28, 2026
…itch (#2795) ## Summary Fixes #2794. Related: #2692. `resolve_model_switch_method()` reads the `configId` key from each `session/new` `configOptions` entry and skips entries that lack it. `claude-agent-acp` (v0.61.0) keys its entries with `id`, so every model-category entry was skipped, the desired model never matched, and Claude Code sessions fell back to the CLI default from the user's `~/.claude/settings.json`. The only trace was a `pool::model` WARN that never reaches the per-agent log files. This is the ACP-side half of the symptom reported in #2692. The open desktop-side PRs (#2695, #2701, #2696) inject `ANTHROPIC_MODEL` at spawn, which masks the problem for spawn-time selection but leaves the config-option switch path broken. ## Changes - `resolve_model_switch_method()` accepts either `configId` or `id` when extracting the config id. The set request is unchanged: the ACP SDK schema takes `configId` as the request param and the adapter resolves it against its `id`-keyed entries, so only the read side needed fixing. - Regression test with an `id`-keyed `configOptions` payload mirroring the real adapter response (including `models: null`, so the unstable fallback path cannot rescue the match). - Doc comment on `extract_model_config_options()` notes the key drift. ## Testing `cargo test -p buzz-acp --lib`: 599 passed, 0 failed. The new test fails on main and passes with this change. Verified against the real adapter: a stdio JSON-RPC probe of the bundled `claude-agent-acp` 0.61.0 confirms `session/new` returns `id`-keyed config options with `opus[1m]` present as a value, and the SDK's `SetSessionConfigOptionRequest` schema accepts `{sessionId, configId, value}` as sent by `session_set_config_option()`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: chillerno1 <gh.chiller@pm.me> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Chessing234
force-pushed
the
fix/claude-model-avatar-bugs
branch
from
July 29, 2026 14:35
b0b2db9 to
e6c5769
Compare
Wire the claude runtime's model_env_var so Edit Agent selections reach spawned sessions, and treat ANTHROPIC_MODEL as a derived key. Closes block#2692 Signed-off-by: Taksh <takshkothari09@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Prefer the managed agent avatar URL before the profile query cache so custom icons don't flash to monograms on cold start. Closes block#2576 Signed-off-by: Taksh <takshkothari09@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Single const for discovery, derived-key filter, and readiness so the key cannot drift; pin claude runtime shape with a regression test. Signed-off-by: Taksh <takshkothari09@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Move the regression test into a sibling module so discovery/tests.rs does not grow past the over-limit baseline. Signed-off-by: Taksh <takshkothari09@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Chessing234
force-pushed
the
fix/claude-model-avatar-bugs
branch
from
July 29, 2026 14:45
e6c5769 to
63a2c01
Compare
Contributor
Author
|
Rebased onto latest CI workflows are waiting on maintainer approval for this fork push — please Approve and run workflows when you can. |
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
ANTHROPIC_MODELat spawnTest plan
just ciCloses #2692
Closes #2576
Made with Cursor