feat(agents): set active session agent from agents menu - #1349
Merged
Merged
Conversation
jatmn
requested changes
May 25, 2026
jatmn
left a comment
Collaborator
There was a problem hiding this comment.
Findings
- [P2] Apply the selected agent model when switching active agents
src/screens/REPL.tsx:2561
The new menu path updatesmainThreadAgentDefinition, bootstrap agent type, session metadata, andAppState.agent, but it never updates the main loop model. Startup--agentalready applies an agent-specific model when no explicit--modelwas provided, so an agent with frontmatter likemodel: haikuormodel: sonnetbehaves differently depending on whether the user starts with--agentor chooses the same agent from/agents. Since issue #526 asks users to switch active agents without restarting, the next turn should use the same effective model that startup would have selected, or the UI should avoid claiming the session agent was fully switched. Please update the runtime setter to mirror the startup model-selection path, while preserving explicit user model overrides.
Contributor
Author
|
Addressed the requested model-selection behavior in The Added focused regression coverage for:
Validation:
I also updated the PR description so the behavior and test list match the current implementation. |
jatmn
approved these changes
May 25, 2026
jatmn
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for addressing the active-agent model-selection follow-up.
No issues here, LGTM.
jatmn
requested review from
Vasanthdev2004,
anandh8x,
auriti,
gnanam1990 and
techbrewboss
May 25, 2026 16:39
discopops
pushed a commit
to discopops/openclaude
that referenced
this pull request
May 28, 2026
* feat(agents): set active session agent from agents menu * fix agents menu model switching
Gravirei
added a commit
to Gravirei/openclaude
that referenced
this pull request
May 28, 2026
- fix(autocompact): retry circuit breaker after cooldown (Twigpine#1375) - fix(provider): require API key input when adding OpenGateway (Twigpine#1384) - fix(provider): allow remote Ollama without OPENAI_API_KEY (Twigpine#952) - fix(codex-stream): recover tool args delivered only via done events (Twigpine#1262) - fix: route MiniMax compacting through Anthropic-compatible API (Twigpine#1154) - fix(thinking): disable thinking for unsupported Ollama models (Twigpine#1376) - feat(agents): set active session agent from agents menu (Twigpine#1349) - fix(repl): show permission prompts while draft input is present (Twigpine#1393) - fix(model): include profile models in descriptor picker (Twigpine#1361) - Improve warning notice formatting (Twigpine#1415) - fix(codex): allow credential storage fallback (Twigpine#1347) - fix(attribution): make git attribution opt-in by default (Twigpine#1335) - fix(agent): allow custom model overrides (Twigpine#1337) - feat(query): robust multi-lingual and structural continuation nudge (Twigpine#1280) - fix(watchers): debounce skills and settings reload bursts (Twigpine#1370) - feat: configure API retry backoff (Twigpine#370) (Twigpine#1095) - chore(main): release 0.15.0 (Twigpine#1325) - ci: retrigger CodeQL after action download outage (Twigpine#1374) - Fix launcher heap setup for long sessions (Twigpine#1242)
hotmanxp
pushed a commit
to hotmanxp/openclaude
that referenced
this pull request
Jun 5, 2026
* feat(agents): set active session agent from agents menu * fix agents menu model switching
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
/agentsdialog.Set as active agentaction from the agent menu.--agentbehavior when no explicit model override is active.Why
Fixes #526. Users could inspect and manage agents, but they could not easily see which agent was active or switch the active session agent without restarting with
--agent.Behavior
/agentsnow showsCurrent session agent: <name>ornone.Set as active agentupdates the active agent for the current session.modelfrontmatter and the user has not explicitly chosen a model, the next turn uses the same effective model startup--agentwould have selected.Out of scope
--agentparsingTesting
bun install --frozen-lockfile— passedbun install --cwd web --frozen-lockfile— passedbun test src/components/agents/ src/components/PromptInput/PromptInputQueuedCommands.test.tsx --max-concurrency=1— passed, 15 testsbun test src/components/StartupScreen.test.ts src/tools/BashTool/BashTool.errorOutput.test.ts --max-concurrency=1— passed, 40 testsgit diff --check— passedbun run build— passedbun run smoke— passedbun test --max-concurrency=1— passed, 2885 tests passed, 2 skipped, 0 failed, with a clean test home/provider environmentpython -m pytest -q python/tests— passed, 44 testsbun run security:pr-scan -- --base upstream/main— passedbun run test:provider— passed, 596 testsnpm run test:provider-recommendation— passed, 78 testsbun run --cwd web typecheck— passedbun run --cwd web build— passedReview update validation:
bun test src/screens/replActiveAgentModel.test.ts src/components/agents/AgentsMenu.test.tsx src/components/agents/AgentsList.test.tsx— passed, 11 testsgit diff --check— passedAdditional non-CI check:
bun run typecheck— fails on existing repository-wide TypeScript baseline issues unrelated to this PR, including missing generated modules and unrelated test typing errors. This command is not part of.github/workflows/pr-checks.yml.Fixes #526