npx claudepluginhub devhimanshulohani/claude-agent-managerSpawn and manage autonomous background agents with persistent state across sessions
A Claude Code plugin for spawning and managing autonomous background agents with persistent state across sessions.
.claude/agents/registry.json)claude plugin install agent-manager
When enabling, you'll be prompted for optional defaults:
haiku, sonnet, or opus (leave empty to inherit from session)low, medium, high, or max (leave empty for high)Or test locally:
claude --plugin-dir /path/to/claude-agent-manager
| Command | Description |
|---|---|
/agent "task" | Spawn a new background agent |
/agent list | Show all agents and their status |
/agent switch <id> | View details of a specific agent |
/agent stop <id> | Stop a running agent |
/agent merge <id> | Merge a completed agent's branch |
/agent history | Show full agent history |
/agent clean | Remove finished agents and worktrees |
| Command | Description |
|---|---|
/agent resume <id> | Resume a stopped/failed agent on its existing branch |
/agent retry <id> | Re-spawn a failed agent with the same task from scratch |
| Command | Description |
|---|---|
/agent diff <id> | Quick inline diff preview of agent's changes |
/agent logs <id> | Summarized activity log of what the agent did |
/agent stats | Lifetime stats — total spawned, success rate, etc. |
| Command | Description |
|---|---|
/agent batch "task1" "task2" | Spawn multiple agents in parallel |
/agent note <id> "text" | Attach a note to an agent |
/agent watch <id> | Poll a running agent until completion |
/agent rebase <id> | Rebase agent branch onto latest main |
/agent export <id> | Export changes as a .patch file |
Spawn with a pre-defined template:
/agent --template api "add user profile endpoint"
Templates are stored in .claude/agents/templates/ as JSON files:
{
"name": "api",
"description": "API endpoint template",
"verifyCommand": "npm test",
"commitFormat": "feat(api): {description}"
}
Required fields: name, description. Optional: verifyCommand (overrides Phase 4 auto-detection), commitFormat (overrides conventional commit format).
| Flag | Values | Description |
|---|---|---|
--model | haiku, sonnet, opus | Choose which model the agent uses |
--effort | low, medium, high, max | Effort level metadata (worker runs at high) |
--color | red, blue, green, yellow, purple, orange, pink, cyan | Visual color for agent identification |
--max-turns | <number> | Max turns metadata (worker default: 200) |
--template | <name> | Use a pre-defined template |
Note:
--modelis the only flag that changes agent behavior at runtime (via the Agent tool'smodelparameter).--effortand--max-turnsare stored in the registry for tracking but the worker subagent always useseffort: highandmaxTurns: 200from its definition.--colorsets the agent's display color.
Examples:
/agent --model sonnet "refactor the auth module"
/agent --model haiku --color blue "add JSDoc comments to utils/"
/agent --max-turns 50 "quick formatting fix"
/agent batch --model sonnet "task one" "task two"
worker subagent in an isolated git worktreeverifyCommand)SubagentStop hook auto-updates the registry when agents complete.claude/agent-memory/worker/)