Skip to content
Development
Command

/team-shutdown

Gracefully shut down an agent team, collect final results, and clean up resources

From plugin
agents
42k93 skills137 agents93 commands
$ npx -y skills add wshobson/agents --agent claude-code

Command definition

team-shutdown.md
description: "Gracefully shut down an agent team, collect final results, and clean up resources"
argument-hint: "[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

1. Parse `$ARGUMENTS` for 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

2. Read team config from `~/.claude/teams/{team-name}/config.json` using the Read tool 3. Call `TaskList` to check for in-progress tasks

4. If there are in-progress tasks and `--force` is 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:

1. Use `SendMessage` with `type: "shutdown_request"` to request graceful shutdown

  • Include content: "Team shutdown requested. Please finish current work and save state."

2. 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

1. Display shutdown summary:

   Team "{team-name}" shutdown complete.

   Members shut down: {N}/{total}
   Tasks completed: {completed}/{total}
   Tasks remaining: {remaining}

2. Unless `--keep-tasks` is set, call `TeamDelete` to remove team and task directories

3. If `--keep-tasks` is set, inform user: "Task list preserved at ~/.claude/tasks/{team-name}/"

Read more
@wshobson
Ships withagents

Use one collection of plugins, agents, skills, and commands across Claude Code, OpenAI Codex CLI, Cursor, OpenCode, Antigravity CLI, GitHub Copilot, and Pi. A harness is the coding tool that loads and runs the components.

42k185 skills137 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
42.4k
Star history of wshobson/agents on GitHub, a chart by star-history.com

Other commands on agents.

accessibility-audit

accessibility-audit

Command

Audit web accessibility for WCAG compliance with automated axe-core tests, keyboard and screen reader checks, and remediation…

@wshobson@wshobsonInstall Command
improve-agent

improve-agent

Command

Improve an existing agent through performance baselines, prompt engineering, A/B testing, and staged rollout

@wshobson@wshobsonInstall Command
multi-agent-optimize

multi-agent-optimize

Command

Optimize multi-agent system performance through profiling, context window tuning, coordination efficiency, and cost and latency…

@wshobson@wshobsonInstall Command
team-debug

team-debug

Command

Debug issues using competing hypotheses with parallel investigation by multiple agents

@wshobson@wshobsonInstall Command
team-delegate

team-delegate

Command

Task delegation dashboard for managing team workload, assignments, and rebalancing

@wshobson@wshobsonInstall Command
team-feature

team-feature

Command

Develop features in parallel with multiple agents using file ownership boundaries and dependency management

@wshobson@wshobsonInstall Command

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command