fix(desktop): Claude model picks + agent avatars after restart
Summary
- Claude Code agents honor the Edit Agent model picker via
ANTHROPIC_MODELat spawn - Agents screen keeps custom avatars after restart by preferring the managed agent URL
Test plan
- [x]
just ci - [ ] Set a Claude Code agent model ≠ global default → restart → ask which model it is
- [ ] Set a custom agent avatar → quit/relaunch Buzz → Agents screen still shows it
Closes #2692 Closes #2576
Made with Cursor
Heads up: #2695 (opened earlier today, also fixing #2692) carries this same fix — model_env_var: Some(ANTHROPIC_MODEL) + the derived-key addition, with two extras worth keeping whichever PR moves forward:
- a shared
ANTHROPIC_MODEL_ENV_KEYconst inenv_vars.rsreferenced by the runtime entry, the derived-key list, and the existing literal inreadiness.rs's provider-model mapping — three call sites, one definition, so the key can't drift; - a regression test pinning the claude runtime shape itself (
known_acp_runtime_exact("claude").model_env_var == Some("ANTHROPIC_MODEL"), provider still locked).
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.
Folded in the shared ANTHROPIC_MODEL_ENV_KEY + claude runtime shape regression from #2695. Avatar fix stays here; fine if you close #2695 as duplicate.
Rebased onto latest main to pick up nostr 0.44.6 (RUSTSEC-2026-0216) and the file-size ratchet baseline. Local Desktop file-size check is clean against current main.
CI workflows are waiting on maintainer approval for this fork push — please Approve and run workflows when you can.
@tlongwell-block @wesbillman @wpfleger96 mind taking a look when you get a chance?
🔐 Codex Security Review
Status: review required for the current range.
The current range is
78618804ec86a014524ad7d1fb55928e8f5c3edf...bc4b6c055b91ab573fb5a960aa611022d7a4a071. A new review must complete for this exact range. When manual authorization is required, a Block organization member must comment exactly@buzz-security-review bc4b6c055b91ab573fb5a960aa611022d7a4a071to authorize a new review. Any previous review applies only to its recorded range.
rebased onto main