claude-bulkhead
Stop Claude Code from running rm -rf $DIR/ when $DIR is empty, pkill node on your other dev servers, taking their ports, and committing another session's edits with git add -A.
Hooks that know which processes, ports and git trees belong to which Claude Code session and subagent, so they block only what would hurt something else, and tell Claude the safe command to run instead.
Windows, macOS and Linux. No tmux, no sudo, no background daemon, no network calls, no dependencies. Also guards Codex, Gemini CLI, Copilot CLI, Cursor, Pi and ten more agents.
한국어 | 简体中文 | 日本語 | Español | Português (Brasil)
Install
First, with nothing installed, see what it would have stopped in your own sessions:
npx -y claude-bulkhead scan --since 30d --share
It only reads the transcripts in ~/.claude/projects and sends nothing.
Then install the plugin inside Claude Code:
/plugin marketplace add dooly6276/claude-bulkhead
/plugin install bulkhead@bulkhead
Once installed, the same report runs inside Claude Code:
/bulkhead:scan 30d
Other agents load the same guards as a plugin:
| Agent | Install |
|---|
| Copilot CLI | copilot plugin marketplace add dooly6276/claude-bulkhead, then copilot plugin install bulkhead@bulkhead |
| Cursor | git clone https://github.com/dooly6276/claude-bulkhead ~/.cursor/plugins/local/bulkhead, then Developer: Reload Window |
| opencode | add "plugin": ["claude-bulkhead"] to opencode.json |
| Pi | pi install npm:claude-bulkhead |
| Gemini CLI | gemini extensions install https://github.com/dooly6276/claude-bulkhead |
| Codex | codex plugin marketplace add dooly6276/claude-bulkhead, then codex plugin add bulkhead@bulkhead, then approve the hook with /hooks |
For the others (Qwen Code, Kimi Code, Grok Build, Antigravity, Windsurf, Droid, Devin, Cline, Amp), see Codex, Gemini and other agents.
Node 18 or later must be on PATH (the native Claude Code installer does not install it; check with node --version).