stop-that-shit — Claude Code hook: what it does, how to install
The stop-that-shit hook for Claude Code and Codex checks agent actions against explicit task modes and bounds decisions about dependencies, hashes, and subagents.
MIT ★ 1,596 updated 2026-10-29
.claude/settings.jsonWhat stop-that-shit does
stop-that-shit adds a local policy layer for Codex and Claude Code. It works with explicit task modes, checks actions before they run, and places bounds on decisions involving dependencies, hashes, and subagents.
The hook runs on UserPromptSubmit, PreToolUse, PostToolUse, and SessionEnd. Its post-tool matcher covers spawn_agent, Agent, wait_agent, and related names. The handler is loaded from hooks/stop-that-shit.cjs through node; pre-tool checks have a 5-second timeout, while the session-end check has a 3-second timeout. The plugin layout must keep that handler path intact.
What it helps with
- keep agent work inside a defined scope
- check an action before a tool call
- bound dependency and hash decisions
- track subagent spawning and waiting
- run a check when a session ends
Example prompts for the agent
- Work only within the current task scope and check each action before calling a tool.
- Before spawning a subagent, verify that the decision stays within the task boundaries.
- When the session ends, run the final state check for the task.
How to install stop-that-shit
Manually: put the files in place
.claude/settings.jsonThe hooks block: event (PreToolUse, PostToolUse, Stop…) → command. Personal ones go to ~/.claude/settings.json
Step by step, with commands for each platform: Claude Code hooks: what they are, where to configure them, how to block a risky command
Questions about stop-that-shit
How do I install stop-that-shit in Claude Code?
Add the hook configuration through .claude/settings.json.
What does stop-that-shit do?
It adds local task-scope checks, reviews actions around tool calls, and bounds decisions about dependencies, hashes, and subagents.
Which events trigger stop-that-shit?
It runs on UserPromptSubmit, PreToolUse, PostToolUse, and SessionEnd. Its post-tool matcher also covers subagent-related calls.
Source text
codex-hooks.json · MIT
Hooks bundle shipped with the stop-that-shit plugin for Claude Code.
Local-first scope guard for Codex with explicit task modes, before-action checks, and bounded dependency, hash, and subagent decisions.
Triggers on: PreToolUse, PostToolUse, UserPromptSubmit, SessionEnd.
```json
{
"description": "Stop That Shit: a small on-demand policy with a few high-confidence Codex gates.",
"hooks": {
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "node -e \"const p=require('node:path');require(p.join(process.env.PLUGIN_ROOT??process.env.CLAUDE_PLUGIN_ROOT,'hooks','stop-that-shit.cjs'))\"",
"timeout": 5
}
]
}
],
"PostToolUse": [
{
"matcher": "^(?:spawn_agent|Agent|wait_agent|multi_agent_v1wait_agent|collaborationspawn_agent|collaborationwait_agent)$",
"hooks": [
{
"type": "command",
"command": "node -e \"const p=require('node:path');require(p.join(process.env.PLUGIN_ROOT??process.env.CLAUDE_PLUGIN_ROOT,'hooks','stop-that-shit.cjs'))\"",
"timeout": 5
}
]
}
],
"PreToolUse": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "node -e \"const p=require('node:path');require(p.join(process.env.PLUGIN_ROOT??process.env.CLAUDE_PLUGIN_ROOT,'hooks','stop-that-shit.cjs'))\"",
"timeout": 5,
"statusMessage": "Checking the Stop Ladder..."
}
]
}
],
"SessionEnd": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "node -e \"const p=require('node:path');require(p.join(process.env.PLUGIN_ROOT??process.env.CLAUDE_PLUGIN_ROOT,'hooks','stop-that-shit.cjs'))\"",
"timeout": 3
}
]
}
]
}
}
```
© Stop That Shit contributors · MIT · hashgraph-online/awesome-codex-plugins