[Bug] `claude agents` command ignores top-level flags (--add-dir, --plugin-dir, --settings, --mcp-config)
Bug Description
Feedback: claude agents (v2.1.140) doesn't accept the standard top-level flags.
Repro: from a project subdirectory I wrap claude in a shell function that
auto-discovers parent config and invokes:
claude \
--add-dir ~/path/to/parent \
--plugin-dir ~/path/to/parent/.claude/plugins/myplugin/ \
--settings ~/path/to/parent/.claude/settings.json \
--mcp-config ~/path/to/parent/.mcp.json \
agents
Result: agents view does NOT open. Instead claude prints the static
"Built-in agents:" list and exits, as if running non-interactively.
Bare claude agents (no flags) correctly opens the interactive view.
Expected: claude agents should accept --add-dir, --plugin-dir, --settings,
--mcp-config (same as interactive REPL) so the agents view reflects the
project's discovered plugins, settings, MCP servers, and CLAUDE.md.
Impact: users with wrapper scripts must special-case agents and drop all
context flags, losing project-specific agent/plugin/MCP visibility in the view.
Environment Info
- Platform: darwin
- Terminal: ghostty
- Version: 2.1.140
- Feedback ID: 496da92e-1aac-4b53-8cc7-f8274848a2a1
Other
- I use this alias setup, which allows me to type
c work on xyzaside from the above additional settings shenanigans: https://github.com/rethab/dotfiles/blob/264f81144a5297ba12e2b48e1d84ffce6f930125/alias.sh#L66 - Related issue where it also falls back to static list, but in a different scenario: #58571
3 Comments
Thanks for the detailed report — this was a real gap in how the
agentsentry handled top-level flags.Fixed in tomorrow's release (v2.1.142).
claude agentswill accept--add-dir,--settings,--mcp-config, and--plugin-dir, and they'll apply both to the dashboard itself and to every background session you dispatch from it — so your wrapper script will work as written.This issue was fixed as of version 2.1.142.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.