Built-in subagents are registered by default in interactive sessions, but a team may not want them. To remove only the built-in Explore and Plan subagents, set CLAUDE_CODE_DISABLE_EXPLORE_PLAN_AGENTS=1. Claude then reads and explores files directly instead of delegating to them. The setting requires Claude Code v2.1.198 or later.
Before you start
You need Claude Code v2.1.198 or later and a way to set an environment variable before starting it. Check the version first: the setting does nothing on an older version.
Set the variable and restart Claude Code
Set CLAUDE_CODE_DISABLE_EXPLORE_PLAN_AGENTS=1 in the environment where you start Claude Code, then restart the session. In non-interactive mode and the Agent SDK, the equivalent is CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS=1, which removes all built-in types so you can supply only your own.
Ask a search question and check no delegation happens
Ask Claude where a feature lives and check the main agent searches directly instead of delegating to Explore. If a subagent still runs, the variable was set after the session started, or the version is older than v2.1.198.
Worked example: Disabling built-ins for a fictional team
Maple Dev is a fictional development team that wants the main agent to search directly. The table shows the check.
| Check | Expected |
|---|---|
| Variable set | CLAUDE_CODE_DISABLE_EXPLORE_PLAN_AGENTS=1 |
| Version | v2.1.198 or later |
| Search question | Main agent searches, no Explore delegation |
Expected result (UNTESTED): after restart, a search question is handled by the main agent with no Explore subagent in the log. We checked the Claude Code subagents documentation, which describes the variable and the version requirement, but we did not set it on this machine.
Limits
Disabling the built-ins removes the context savings they provide: the main conversation now carries the search context. Only disable them if the team has a reason, and keep custom subagents, which the setting does not remove.
