agent-brain-stop

A command that stops the Agent Brain server for a project. The server is a background process used by that project.

In plain words
What is it for?
Use it to stop the current project's server, target another project path, set a shutdown timeout, force termination, or request JSON output.
Why use it?
It lets you end the server cleanly and provides a force option if it does not stop within the chosen time.

Command

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/spillwavesolutions/agent-brain/agent-brain-stop
Clone the repo
git clone --depth 1 https://github.com/SpillwaveSolutions/agent-brain
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 842 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.00013 $0.00842
Opus 5 $0.00006 $0.00421
Sonnet 5 $0.00003 $0.00168
Haiku 4.5 $0.00001 $0.00084

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

Security

Grade A, and why

agent-brain-stop 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 2d 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.

agent-brain-plugin/commands/agent-brain-stop.md · 142 lines

How it starts

The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Stop Agent Brain Server

Purpose

Gracefully stops the Agent Brain server running for the current project. Sends SIGTERM and waits for graceful shutdown. If --force is specified and the process does not exit within the timeout, sends SIGKILL.

Usage

/agent-brain:agent-brain-stop [--path <dir>] [--force] [--timeout <sec>] [--json]

Parameters

Parameter Required Default Description
--path, -p No auto-detect Project path
--force, -f No false Force stop with SIGKILL if SIGTERM fails
--timeout No 10 Graceful shutdown timeout in seconds
--json No false Output as JSON

Execution

# Stop server for current project
agent-brain stop

# Force stop if graceful shutdown fails
agent-brain stop --force

# Stop a specific project's server
agent-brain stop --path /my/project

# JSON output for scripting
agent-brain stop --json

Expected Output (Success)

Stopping server (PID 12345)...
Server stopped gracefully (PID 12345).

JSON Output (Success)

{
  "status": "stopped",
  "message": "Server stopped gracefully",
  "pid": 12345,
  "project_root": "/home/user/my-project"
}

Expected Output (Server Not Running)

No server running for this project.

Force Kill Output

Stopping server (PID 12345)...
Graceful shutdown timeout, sending SIGKILL...
Server force killed (PID 12345).

Output

Format the result as follows:

Server Stopped Successfully:

  • Confirm the server was stopped
  • Report the PID that was terminated
  • State files and registry entry are cleaned up automatically

Server Not Running:

  • Inform the user no server was found

Server Already Stopped:

  • If the process is no longer alive but state files exist, they are cleaned up

Error Handling

Error Cause Resolution
No server running Server already stopped or never started No action needed
Permission denied Process owned by different user Run with appropriate permissions
Graceful shutdown timeout Process unresponsive within timeout Use --force to send SIGKILL
No Agent Brain state found State directory missing Project may not be initialized

Read the full file on GitHub · 142 lines

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. 2d ago First seen · 142 lines · 13 tokens per session scan A 67fb9b0cb766

Subscribe to this mod's changes

agent-brain-stop is a command published in the GitHub repository SpillwaveSolutions/agent-brain (117 stars, last pushed 3d ago), licensed MIT. It adds 13 tokens to every session and 842 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.