Feature Request: Automatic agent routing based on task context

Resolved 💬 3 comments Opened Mar 9, 2026 by othmaratzmueller-bit Closed Apr 20, 2026

Summary

When building multi-agent workflows with Claude Code, users currently need to define routing rules manually in CLAUDE.md and explicitly orchestrate which subagent handles which task. This works, but requires upfront configuration and Claude must follow hand-written rules.

Use Case

We use Claude Code with specialized subagents for different task types (analysis, implementation, security review, documentation). Our CLAUDE.md defines routing like:

| Task | Agent |
|---|---|
| Analysis, exploration | talos-analyst |
| Code writing, bugfix | talos-impl |
| Security review | talos-security-reviewer |
| Docs, version, changelog | talos-doc-updater |

This works well — but it requires manually maintaining routing rules in CLAUDE.md and trusting Claude to follow them consistently.

Feature Request

A built-in automatic context router that selects the appropriate subagent type based on task semantics, without needing hand-written routing rules in CLAUDE.md.

Possible implementation options

  1. subagent_type: "auto" in the Agent tool — Claude infers the best agent type from task description + available agents
  2. Declarative routing config — a structured section in CLAUDE.md or .claude/routing.json that maps task patterns to agent types, evaluated automatically
  3. Agent skill tags — agents declare their capabilities (skills: ["code", "security"]), router matches based on task embedding similarity

Expected behavior

User: "Fix the bug in quota_manager.py"
→ Router detects: code change task
→ Automatically delegates to: impl-agent (Opus)

User: "Explain how the circuit breaker works"  
→ Router detects: analysis/explanation task
→ Automatically delegates to: analyst-agent (Sonnet)

Why this matters

Multi-agent workflows are powerful but currently require significant orchestration boilerplate. Native routing would make it easier to build robust, specialized agent teams without maintaining complex routing logic in every project's CLAUDE.md.

Current workaround

Manual routing rules in CLAUDE.md + explicit Agent tool calls. Works, but fragile and project-specific.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗