Skip to content

agent_servers: Migrate all built-in agents use the registry instead#50094

Merged
benbrandt merged 23 commits intomainfrom
migrate-builtin-agents
Feb 26, 2026
Merged

agent_servers: Migrate all built-in agents use the registry instead#50094
benbrandt merged 23 commits intomainfrom
migrate-builtin-agents

Conversation

@benbrandt
Copy link
Copy Markdown
Member

@benbrandt benbrandt commented Feb 25, 2026

This has lots of benefits, but mainly allows users to uninstall agents.

Release Notes:

  • acp: All built-in agents are now removable and can be managed via the ACP Registry.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 25, 2026
@zed-community-bot zed-community-bot bot added the staff Pull requests authored by a current member of Zed staff label Feb 25, 2026
@benbrandt benbrandt force-pushed the migrate-builtin-agents branch from 4b32a1d to 9462e5d Compare February 25, 2026 15:15
Replace the dedicated `ClaudeAgent`, `Codex`, and `Gemini` `AgentType`
variants and their corresponding `AgentServer` impl files with the
generic `Custom` variant, treating all three as named custom agents.
Uninstalled built-in agents (Claude, Codex, Gemini) are now unified
into the same sorted list as installed agents, rather than being
rendered as a separate section below. Icons and display names for
uninstalled entries are resolved from the agent registry. Clicking
an uninstalled entry writes the registry entry to settings before
opening a new thread, matching the previous behavior.
Replace the separate `gemini`, `claude`, and `codex` fields in
`AllAgentServersSettings` with a single transparent `HashMap`, treating
all agent servers uniformly. The `BuiltinAgentServerSettings` type is
removed entirely.
- Replace `unwrap()` calls in `migrate_builtin_entry` with early returns
- Move `NO_BROWSER` env var insertion inside the codex-specific branch
- Use constants for built-in agent names instead of string literals
- Treat previously built-in agents as registry agents for refresh logic
- Simplify sort to use `sorted_unstable_by_key`
Scope the `NO_BROWSER=1` environment variable injection to only apply
when launching the Codex agent, rather than any agent that reports
`no_browser: true` in its envelope.

Also consolidate built-in agent rendering in the configuration panel to
treat them the same as user-defined agents, removing special-cased
hardcoded entries for Claude, Codex, and Gemini. Use the exported name
constants in onboarding modals instead of inline string literals.
- Implement `From<anyhow::Error>` for `ThreadError` instead of a
  custom `from_err` method that took an agent name parameter
- Merge `handle_any_thread_error` and `handle_thread_error` into a
  single `handle_thread_error` method accepting `impl Into<ThreadError>`
- Guard Gemini-specific auth handling behind an `agent_name` check
  instead of relying on the agent name at the error conversion site
Move the "uninstalled built-in agents" (Claude, Codex, Gemini) into
their own menu section below a separator, distinct from
already-installed
agents. Previously they were mixed into the same list, which made the
install-on-click handler awkward. Now installed agents appear first,
followed by a separator and the promotable uninstalled agents.
@benbrandt benbrandt force-pushed the migrate-builtin-agents branch from 9462e5d to fb7ad84 Compare February 25, 2026 18:45
benbrandt and others added 5 commits February 26, 2026 12:06
Co-authored-by: Anthony Eid <[email protected]>
Co-authored-by: cameron <[email protected]>
Co-authored-by: Anthony Eid <[email protected]>
Co-authored-by: cameron <[email protected]>
Co-authored-by: Anthony Eid <[email protected]>
Co-authored-by: cameron <[email protected]>
Co-authored-by: Anthony Eid <[email protected]>
Co-authored-by: cameron <[email protected]>
Co-authored-by: Anthony Eid <[email protected]>
Co-authored-by: cameron <[email protected]>
@benbrandt benbrandt marked this pull request as ready for review February 26, 2026 11:19
benbrandt and others added 2 commits February 26, 2026 12:50
Co-authored-by: Anthony Eid <[email protected]>
Co-authored-by: cameron <[email protected]>
Co-authored-by: Anthony Eid <[email protected]>
Co-authored-by: cameron <[email protected]>
@benbrandt benbrandt enabled auto-merge (squash) February 26, 2026 11:53
benbrandt and others added 2 commits February 26, 2026 13:03
Co-authored-by: Anthony Eid <[email protected]>
Co-authored-by: cameron <[email protected]>
Co-authored-by: Anthony Eid <[email protected]>
Co-authored-by: cameron <[email protected]>
@benbrandt benbrandt changed the title agent_servers: Migrate all built-in agents to go via registry agent_servers: Migrate all built-in agents use the registry instead Feb 26, 2026
@benbrandt benbrandt merged commit f4e65d8 into main Feb 26, 2026
42 of 44 checks passed
@benbrandt benbrandt deleted the migrate-builtin-agents branch February 26, 2026 12:24
rtfeldman pushed a commit that referenced this pull request Feb 27, 2026
This has lots of benefits, but mainly allows users to uninstall agents.

Release Notes:

- N/A

---------

Co-authored-by: Anthony Eid <[email protected]>
Co-authored-by: cameron <[email protected]>
tahayvr pushed a commit to tahayvr/zed that referenced this pull request Mar 4, 2026
…dustries#50094)

This has lots of benefits, but mainly allows users to uninstall agents.

Release Notes:

- N/A

---------

Co-authored-by: Anthony Eid <[email protected]>
Co-authored-by: cameron <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant