---
title: "collision-guard"
url: "https://claudemods.dev/en/builds/collision-guard-617ac2"
source: "https://github.com/eshin087/claude-code-mods/tree/main/collision-guard"
source_type: "github"
repo: "https://github.com/eshin087/claude-code-mods/tree/main/collision-guard"
author: "eshin087"
author_handle: "eshin087"
stars: 0
category: "Workflows & CI"
categories: ["workflow"]
tags: ["claude-code", "collision-detection", "git", "hooks", "multi-session", "plugin", "workflow"]
permission_level: 2
scan_complete: true
install: "claude plugin marketplace add eshin087/claude-code-mods\nclaude plugin install collision-guard"
added: "2026-10-05T01:53:16.633Z"
updated: "2026-10-25T21:14:22Z"
locale: "en"
content_locale: "en"
---

# collision-guard

Warns when another Claude session on the same repo already edited the file being changed, or claimed the same package version.

## Description

Collision Guard is a Claude Code mod that warns when two sessions work on the same repository and touch the same file, or claim the same package version. Each session records its edits (Edit/Write/NotebookEdit) keyed by repo, and before an edit it checks other sessions' records (ignoring edits older than 12 hours). Warnings appear as toasts and are surfaced to Claude, and a /collisions command lists other active sessions, their branches, worktrees, versions, and overlapping files. It uses no model calls and stores data under ~/.claude/mods-data/collision-guard/. It only detects sessions that also run the mod, and it warns without blocking.

## Install

```
claude plugin marketplace add eshin087/claude-code-mods
claude plugin install collision-guard
```

## Original README

# Collision Guard

**What it does:** warns when two Claude sessions work on the same repo and touch the same file, or both claim the same version number. Catching that early avoids the merge conflicts and renumbering it otherwise causes.

**Where you see it:**
- **Toast:** `⚠ src/09-render.js was also edited 25m ago by another session (release/v0.10.1 · spacex · "Tesla Roadster…")`.
- Claude gets the same note, so it keeps the change focused and mentions the overlap in its report.
- **Version clash:** when `package.json` gets a version another session (on another branch) already uses.
- **`/collisions`:** other sessions active on this repo in the last 24h, their branch, worktree, version, and the files you both edited.

**How it works:** each session records the files it edits (Edit/Write/NotebookEdit) in its own file, keyed by repo. Worktrees count as the same repo, and paths are compared repo-relative. Before an edit, it reads the other sessions' files. Edits older than 12 hours are ignored.

**Cost:** none. No model calls.

**Data saved:** `~/.claude/mods-data/collision-guard/<repo>/<session>.json`.

**Notes:** it only knows about sessions that also run this mod. It warns, it never blocks.
