team-shutdown

team-shutdown is a command for coding agents from wshobson/agents. It costs 16 tokens per session (438 once invoked), scanned A, original, MIT.

A command for gracefully stopping a group of AI agents, collecting their final results, and cleaning up team resources.

In plain words
What is it for?
Use it to inspect team activity, request shutdowns, wait for responses, report rejected shutdowns, or force cleanup while optionally keeping the task list.
Why use it?
It helps avoid losing unfinished work by checking active tasks and requesting each agent to shut down before cleanup.

Command

Part of the agent-teams plugin — 6 skills, 7 commands, 4 agents shipped together

About the project

Agentic Plugin Marketplace is a collection of reusable plugins, agents, skills, commands, and rules for coding-agent tools including Claude Code, Codex CLI, Cursor, OpenCode, Antigravity CLI, and GitHub Copilot. It is for developers assembling agentic workflows across multiple harnesses from shared Markdown sources, and the catalogue entries are examples or subsets of those workflow components.

wshobson/agents · 39,397 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/wshobson/agents/team-shutdown
Clone the repo
git clone --depth 1 https://github.com/wshobson/agents

Or install agent-teams, the plugin that ships this one along with the rest of its 6 skills, 7 commands, 4 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for team-shutdown

README.md
[![agentmods](https://agentmods.dev/badge/commands/wshobson/agents/team-shutdown.svg)](https://agentmods.dev/commands/wshobson/agents/team-shutdown)
Your own site
<a href="https://agentmods.dev/commands/wshobson/agents/team-shutdown"><img src="https://agentmods.dev/badge/commands/wshobson/agents/team-shutdown.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 438 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00016 $0.00438
Opus 5 $0.00008 $0.00219
Sonnet 5 $0.00003 $0.00088
Haiku 4.5 $0.00002 $0.00044

Measured 5d ago against content hash 77463dc9111b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

team-shutdown scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/agent-teams/commands/team-shutdown.md · 51 lines

What it actually says

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}/"

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 51 lines · 16 tokens per session scan A 77463dc9111b

Subscribe to this mod's changes

team-shutdown is a command published in the GitHub repository wshobson/agents (39,397 stars, last pushed 3d ago), licensed MIT. It adds 16 tokens to every session and 438 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.