claude-code - 💡(How to fix) Fix [Bug] `claude agents` command ignores top-level flags (--add-dir, --plugin-dir, --settings, --mcp-config) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#58624Fetched 2026-05-14 03:43:26
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Author
Participants
Assignees
Timeline (top)
labeled ×5assigned ×1commented ×1

Code Example

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
RAW_BUFFERClick to expand / collapse

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

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [Bug] `claude agents` command ignores top-level flags (--add-dir, --plugin-dir, --settings, --mcp-config) [1 comments, 2 participants]