-
Notifications
You must be signed in to change notification settings - Fork 0
Enhancement: Document --agent mode requirement and generate shell alias for orchestrator #11
Description
Summary
The orchestrator agent generated by /generate-debugger can only dispatch specialist subagents when run via claude --agent <name> (main thread mode). When dispatched as a subagent from a normal conversation, it cannot spawn sub-subagents — Claude Code enforces a maximum nesting depth of 1.
This is not a bug in the plugin, but users are not told about this constraint and naturally try to use the orchestrator as a subagent, which silently fails to delegate.
Evidence
Official Claude Code documentation (code.claude.com/docs/en/sub-agents):
"Subagents cannot spawn other subagents. If your workflow requires nested delegation, use Skills or chain subagents from the main conversation."
"Agent(agent_type) has no effect in subagent definitions."
Current Behavior
- User generates agents with
/generate-debugger - User tries to use the orchestrator from a normal Claude Code session (dispatched as subagent)
- Orchestrator cannot dispatch specialists (nesting blocked)
- Orchestrator falls back to investigating directly
- User doesn't understand why specialists aren't being used
Recommended Changes
1. Document the --agent mode requirement
Add clear documentation in the generated orchestrator's system prompt and in the command output:
The orchestrator must be run via: claude --agent project-debugger
It CANNOT dispatch specialists when run as a subagent from a normal session.
2. Generate a shell alias
After generating the orchestrator, offer to create a shell alias:
alias claudebug='claude --agent project-debugger'And prompt the user to add it to their .zshrc/.bashrc.
3. Update the orchestrator's description
The description should clarify that the agent is designed for --agent mode:
description: |
Debugging orchestrator for [project]. Run via 'claude --agent project-debugger'
to enable specialist subagent dispatching. Cannot dispatch specialists when
run as a subagent from a normal session.4. Consider generating a Skill as alternative entry point
Skills run in the main conversation context and CAN dispatch subagents. A /debug skill could serve as an alternative entry point that:
- Reads the user's problem description
- Dispatches the appropriate specialists directly from the main session
- Follows the orchestration patterns defined in the debugger's system prompt
This would give users two options:
claude --agent project-debuggerfor dedicated debugging sessions/debugfor quick debugging within an existing session
Impact
Users who don't know about --agent mode will never see the multi-agent orchestration working. The feature silently degrades to single-agent behavior.
Environment: Claude Code v2.1.79, macOS
Related: Split from #8