[Bug] `claude agents` command ignores top-level flags (--add-dir, --plugin-dir, --settings, --mcp-config)

Status Fixed / completed
Reported on v2.1.140
Maintainer reply ✓ Yes — bogini
Activity 3 comments · opened May 13, 2026 · closed May 14, 2026
💡 Likely answer: A maintainer (bogini, collaborator) responded on this thread — see the highlighted reply below.

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

View original on GitHub ↗

3 Comments

bogini collaborator · 5 months ago

Thanks for the detailed report — this was a real gap in how the agents entry handled top-level flags.

Fixed in tomorrow's release (v2.1.142). claude agents will 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.

claude[bot] contributor · 5 months ago

This issue was fixed as of version 2.1.142.

github-actions[bot] · 3 months ago

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.