Agent Coherence — Stale Write Guard (FS)
Block stale writes when agents share files, plans or stores on one host
- Pricing
- Open source
- Platforms
- CLI, self-hosted
- Runs
- Locally
- Version
- 0.16.1
- Listing updated
- 3 days ago
About Agent Coherence — Stale Write Guard (FS)
Agent Coherence — Stale Write Guard (FS) is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.
When two agents share a file, one can read version 1, another commits version 2, and the first then overwrites it with no error. This server denies that write, makes the writer re-read, and hands the loser a typed conflict to retry. It works for shared files through CoherentVolume and for store keys through write_cas.
The stdio server comes from the agent-coherence PyPI package and exposes eleven tools: guarded reads and writes, an effect gate, a targeted handoff and a way to give a file back. The same protocol has a LangGraph store, CrewAI and AutoGen adapters, and a Claude Code plugin that protects files such as plan.md.
It covers a single host only and needs Python 3.11 or later.
Install
Run in a terminal
claude mcp add stale-write-guard-fs -- uvx agent-coherenceAdd to claude_desktop_config.json
{
"mcpServers": {
"stale-write-guard-fs": {
"command": "uvx",
"args": [
"agent-coherence"
]
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"stale-write-guard-fs": {
"command": "uvx",
"args": [
"agent-coherence"
]
}
}
}Add to .vscode/mcp.json
{
"servers": {
"stale-write-guard-fs": {
"type": "stdio",
"command": "uvx",
"args": [
"agent-coherence"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"stale-write-guard-fs": {
"command": "uvx",
"args": [
"agent-coherence"
]
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"stale-write-guard-fs": {
"command": "uvx",
"args": [
"agent-coherence"
]
}
}
}What it does
- Stale write denial
- Rejects writes based on an outdated read.
- Typed conflicts
- Gives the loser a conflict to retry.
- Guarded file access
- Guarded reads and writes on shared files.
- Effect gate
- Gates actions behind coherence checks.
- Targeted handoff
- Hands a file to a specific agent.
- Framework adapters
- LangGraph, CrewAI and AutoGen.
Good for
- Keep parallel Claude sessions from clobbering plan.md
- Protect shared state in a multi-agent flow
- Detect lost updates in a LangGraph store
- Add safe handoffs between agents
Pricing
Open source
Published on PyPI; runs locally
Prices change. Check agent-coherence.dev before you buy.
Agent Coherence — Stale Write Guard (FS) FAQ
Does it work across machines?
No, it covers a single host.
What Python version?
3.11 or later.
Which frameworks?
LangGraph, CrewAI and AutoGen, or custom orchestrators.
Is Agent Coherence — Stale Write Guard (FS) free?
Yes. Agent Coherence — Stale Write Guard (FS) is open source, so you can use and self-host it for free.
How do I add Agent Coherence — Stale Write Guard (FS) to Claude Code?
Run this command in your terminal: claude mcp add stale-write-guard-fs -- uvx agent-coherence
What are the best alternatives to Agent Coherence — Stale Write Guard (FS)?
The closest alternatives to Agent Coherence — Stale Write Guard (FS) are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.
Alternatives to Agent Coherence — Stale Write Guard (FS)

REA
MCP serverCLI and MCP server that lets coding agents reverse engineer apps and binaries
Runs locally- Open source
- 464K GitHub stars
- Developer tools

Codebase Memory
MCP serverLocal MCP server that builds a code knowledge graph for AI coding agents
Runs locally- Open source
- 48.7K GitHub stars
- Knowledge and memory

GitHub
MCP serverOfficial MCP server connecting AI assistants to GitHub repos, issues and workflows
Not checked yet- Remote
- Open source
- 34.5K GitHub stars
- Developer tools

Serena MCP: the IDE for your agent
MCP serverMCP toolkit giving coding agents symbol-level code retrieval and editing
Runs locally- Open source
- 31.5K GitHub stars
- Developer tools

XERJ
MCP serverLocal search engine for AI agents with cited answers over your code and docs
Runs locally- Open source
- 19.2K GitHub stars
- Knowledge and memory

Ouroboros
MCP serverSpec-first layer that pins requirements and verifies results of AI coding agent work
Runs locally- Open source
- 6.4K GitHub stars
- Developer tools