Agent View falls back to static agent list on direct Anthropic backend (no provider env vars, disableAgentView unset, v2.1.140)
Summary
claude agents is documented (https://code.claude.com/docs/en/agent-view) as taking over the full terminal and listing every session grouped by state (pinned, needs-you, running, etc.). On my install it instead prints the static configured-agent definition list and exits — same fallback behavior as #58284, but I'm on the direct Anthropic backend with no provider env vars set and no disableAgentView setting.
Reproduction
$ claude --version
2.1.140 (Claude Code)
$ claude update
Current version: 2.1.140
Checking for updates to latest version...
Claude Code is up to date (2.1.140)
$ env | grep -E '^(CLAUDE_CODE_USE_BEDROCK|CLAUDE_CODE_USE_VERTEX|CLAUDE_CODE_USE_FOUNDRY|CLAUDE_CODE_USE_ANTHROPIC_AWS|CLAUDE_CODE_USE_MANTLE|CLAUDE_CODE_DISABLE_AGENT_VIEW)='
(no output)
$ claude agents
18 active agents
Project agents:
portfolio-code-reviewer · opus
Plugin agents:
codex:codex-rescue · sonnet
earnings-reviewer:earnings-reviewer · inherit
...
Built-in agents:
claude · inherit
Explore · haiku
...
No grouped state view, no pinned sessions, no last-changed times — just the static registry.
claude agents --help:
Usage: claude agents [options]
Manage background and configured agents
Options:
-h, --help Display help for command
--setting-sources <sources> Comma-separated list of setting sources to load (user, project, local).
No flag to toggle into Agent View.
Likely cause
Per #58284, the enable-check is:
function DWH(){
return SH(process.env.CLAUDE_CODE_DISABLE_AGENT_VIEW)
|| vS()?.settings.disableAgentView === true
|| yk1();
}
function yk1(){
return SH(process.env.CLAUDE_CODE_USE_BEDROCK)
|| SH(process.env.CLAUDE_CODE_USE_VERTEX)
|| SH(process.env.CLAUDE_CODE_USE_FOUNDRY)
|| SH(process.env.CLAUDE_CODE_USE_ANTHROPIC_AWS)
|| SH(process.env.CLAUDE_CODE_USE_MANTLE)
|| A\$() !== null;
}
In my case none of the env-var branches in yk1() apply and disableAgentView is unset, so the gate is presumably tripping on the last undocumented condition (A\$() !== null). Whatever that is, it's catching at least one plain Anthropic-backend user on the documented version.
Environment
- Claude Code: 2.1.140 (auto-updater says up-to-date)
- Platform: macOS / Darwin 25.4.0, arm64
- Backend: direct Anthropic (no Bedrock/Vertex/Foundry/Mantle env vars)
disableAgentView: not set in~/.claude/settings.json,~/.claude/settings.local.json, or project settingsCLAUDE_CODE_DISABLE_AGENT_VIEW: unsetCLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1is set (mentioning in case it's relevant)- Subscription auth (Pro/Max) — not API key
Asks
- Document what the fourth condition in
yk1()checks for, so users on the direct backend can tell whether they're expected to have Agent View or not. - If Agent View has a separate enablement (account flag, rollout, beta opt-in) beyond the documented version requirement, surface that on the docs page and ideally in
claude agents --help. - Silent fallback to the static list is confusing — when Agent View is gated off, the command should say so ("Agent View unavailable: reason") rather than appearing to succeed with the wrong output.
Related
- #58284 — same fallback symptom, but Bedrock-specific.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗