Signals/ Claude & Anthropic/ Reel /
Two AI agents, one file. Collision Guard stops the crash
A custom Claude Code mod pauses an edit when another session touched the same file.
Claude Code mods can turn a custom workflow rule into an interface that appears at exactly the moment it matters. Collision Guard is a practical example.
Before an Edit, Write or NotebookEdit action, the mod checks whether another session touched the same file in the previous 30 minutes. If it finds a possible conflict, it pauses the write and offers three choices:
- Proceed with the edit
- Move the work into an isolated git worktree
- Cancel the operation
This matters when several coding agents run in parallel. More sessions mean more chances for one agent to overwrite, undo or confuse another agent’s work. A visible decision gate gives you context and control before the collision happens.
To test it, use a disposable repository. Start two sessions, ask both to change the same file, confirm the second write triggers the warning, choose the worktree route, then inspect both diffs before keeping anything.
The catch: Collision Guard is a custom mod, not a built-in guarantee from Anthropic. Use it as an extra coordination layer alongside version control, checkpoints, worktrees, least-privilege access and sandboxing.
Sources & links 3
More on Claude AI News, AI Agent News