mirror of
https://github.com/wshobson/agents.git
synced 2026-03-18 17:47:16 +00:00
New plugin with 7 presets (review, debug, feature, fullstack, research, security, migration), 4 specialized agents, 7 slash commands, 6 skills with reference docs, and Context7 MCP integration for research teams.
1.8 KiB
1.8 KiB
description, argument-hint
| description | argument-hint |
|---|---|
| Gracefully shut down an agent team, collect final results, and clean up resources | [team-name] [--force] [--keep-tasks] |
Team Shutdown
Gracefully shut down an active agent team by sending shutdown requests to all teammates, collecting final results, and cleaning up team resources.
Phase 1: Pre-Shutdown
-
Parse
$ARGUMENTSfor team name and flags:- If no team name, check for active teams (same discovery as team-status)
--force: skip waiting for graceful shutdown responses--keep-tasks: preserve task list after cleanup
-
Read team config from
~/.claude/teams/{team-name}/config.jsonusing the Read tool -
Call
TaskListto check for in-progress tasks -
If there are in-progress tasks and
--forceis not set:- Display warning: "Warning: {N} tasks are still in progress"
- List the in-progress tasks
- Ask user: "Proceed with shutdown? In-progress work may be lost."
Phase 2: Graceful Shutdown
For each teammate in the team:
- Use
SendMessagewithtype: "shutdown_request"to request graceful shutdown- Include content: "Team shutdown requested. Please finish current work and save state."
- Wait for shutdown responses
- If teammate approves: mark as shut down
- If teammate rejects: report to user with reason
- If
--force: don't wait for responses
Phase 3: Cleanup
-
Display shutdown summary:
Team "{team-name}" shutdown complete. Members shut down: {N}/{total} Tasks completed: {completed}/{total} Tasks remaining: {remaining} -
Unless
--keep-tasksis set, callTeammatetool withoperation: "cleanup"to remove team and task directories -
If
--keep-tasksis set, inform user: "Task list preserved at ~/.claude/tasks/{team-name}/"