# claude-bulkhead

> claude-bulkhead is an open-source AI tool for developer tools. Claude Code hooks that stop parallel sessions from killing each other's processes, ports. It is available on CLI, Windows, Linux, macOS and self-hosted.

- **Kind:** Tool
- **Pricing:** Open source
- **Platforms:** CLI, Windows, Linux, macOS, self-hosted
- **Repository:** https://github.com/dooly6276/claude-bulkhead
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-18

## About

The README says claude-bulkhead is a set of hooks that check each shell command a Claude Code session is about to run against the other sessions on the same machine. It looks at which processes and ports belong to which session and subagent, how much RAM is free, and which git worktree each session is editing. A command that would hurt another session is blocked, and the agent receives the safer command to run instead.

The guards run as plain Node scripts with no dependencies, no daemon and no network calls. Each guard can be switched off on its own, and a dry-run style scan can replay past transcripts to show what would have been stopped. Several other agents such as Codex, Gemini CLI and Cursor can load the same guards through their own plugin or hook setup.

It suits developers who run several Claude Code sessions or worktrees of one repository on a single machine, where they share ports and memory. Users with only one session still get the destructive-command and kill protections.

## Features

- **Session-aware kill guard:** Blocks kills by program name that could hit other sessions, while allowing kills by the agent's own PIDs.
- **Port ownership checks:** Stops a dev server from starting on a port another live session is already serving and suggests a free one.
- **Shared RAM queue:** Blocks heavy commands when memory is low, or queues them through bulkhead-slot until there is room.
- **Git tree protection:** Blocks checkouts, stashes, resets and blanket staging in a tree another live session is using.
- **Orphan process cleanup:** Stops dev servers, test workers and watchers that a session left running after it exited.
- **Destructive command blocks:** Refuses rm -rf on roots or empty variables, force-pushes to main and resets that would lose uncommitted work.

## Good for

- Running several Claude Code sessions on separate git worktrees of one app without port clashes
- Stopping an agent from killing every node process while restarting its own dev server
- Preventing a commit from sweeping in another session's unfinished edits
- Keeping parallel test runs and builds from exhausting RAM on a laptop
- Cleaning up dev servers left behind by sessions that have exited

## FAQ

### Does it send any data anywhere?

The README says there is no telemetry and no network call. The only socket is a localhost connection attempt by port-guard. The optional bulkhead remote command connects over SSH only when run.

### What do I do if it blocks a command I meant to run?

Run bulkhead allow with the code shown in the block message to let that command through once. For a permanent change, the README directs users to the global config file to loosen a specific guard.

### Does it work with only one session?

Yes. The README says kill-guard, wait-guard, memory-guard and basics protect a single session, while port-guard and checkout-guard act once a second session is alive.

### Which operating systems are supported?

The README lists Windows, Linux and macOS, with Node 18 or later required.

### Is claude-bulkhead free?

Yes. claude-bulkhead is open source, so you can use and self-host it for free.

### What are the best alternatives to claude-bulkhead?

The closest alternatives to claude-bulkhead are agentshield, Aq, claude-skills, claude-code-best-practice and Claudette.

## Where this comes from

- Description: written from the project's README.

## Alternatives

- [agentshield](https://ai-powered.com/tools/agentshield-2): agentshield is an open-source AI tool for developer tools.
- [Aq](https://ai-powered.com/tools/aq): Aq is an open-source AI tool for developer tools.
- [claude-skills](https://ai-powered.com/tools/claude-skills): claude-skills is an open-source AI tool for coding.
- [claude-code-best-practice](https://ai-powered.com/tools/claude-code-best-practice): claude-code-best-practice is an open-source AI tool for coding.
- [Claudette](https://ai-powered.com/tools/claudette): Claudette is an open-source AI tool for developer tools.
- [Reinwatch](https://ai-powered.com/tools/reinwatch): Reinwatch is an open-source AI tool for developer tools.
- [agents](https://ai-powered.com/tools/agents-6): agents is an open-source AI tool for coding.
- [awesome-claude-code](https://ai-powered.com/tools/awesome-claude-code): awesome-claude-code is a free AI tool for coding.

---
Source: https://ai-powered.com/tools/claude-bulkhead
