Skip to content
Agentmart
Submit a tool

Agent Coherence — Stale Write Guard (FS)

Coherence guard for shared files: denies stale writes so agents don't silently overwrite each other.

Connector by Cohexa-ai · GitHub account verified by the MCP Registry

IndexedLicense unknownLocal (stdio)★ 11
Write a review

Install

Works with Claude Code, Codex, VS Code, Cursor, Windsurf, Claude Desktop. Read the repository before you give any tool access to your data.

npx agentmarket install connector/cohexa-ai-stale-write-guard-fs

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Coherence guard for shared files: denies stale writes so agents don't silently overwrite each other.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this server can do and what it asks for, from its tool list, install config and code. Checked Oct 25, 2026.

Tools
1 read · 8 write · 1 delete
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Tools by what they do 10

Read from the source code; the running server may list different tools.

Read 1 · Look things up without changing anything.

  • swg_status

Write 8 · Create, change, send or run things.

  • swg_accept
  • swg_decline
  • swg_gate
  • swg_read
  • swg_transfer
  • swg_withdraw
  • swg_write
  • swg_write_cas

Delete 1 · Delete, drop, revoke or wipe things.

  • swg_reacquire

Network hosts it talks to 4

  • agent-coherence.dev · found in code
  • cal.com · found in code
  • github.com · found in code
  • glama.ai · found in code

Files it touches

  • /dev/zero
  • /etc/passwd
  • /private
  • /private/var/.../workspace/src/lib
  • /Users/x/repo/docs/plan.md
  • /var
  • Your home directory (~)
  • ~/.config/ccs-diagnose/consent.json
  • ~/.local/share
  • ~/.local/share/ccs-diagnose/calibration.jsonl
  • Any path the agent passes to its tools

Tools (10)

Read from the source code; the running server may differ. Descriptions are the server’s own words; hidden characters are shown as [U+…].

  • swg_accept

    As the successor, accept the live handoff of a path without writing it: a pending handoff becomes completed (a write of the path completes it too). The giver stays fenced until a write moves the version. If another session has acquired the path and nothing has written it since, the handoff is overtaken but live: the accept is taken but changes nothing, answers status=overtaken and names that session as counterparty. Once a write has moved the version the handoff has ended, and the accept is refused handoff_not_live with the status saying how. Refused with handoff_not_successor or handoff_not_l…

  • swg_decline

    As the successor, decline the live handoff of a path: the handoff ends and its giver's fence lifts. Refused with handoff_not_successor or handoff_not_live, as an error that changes nothing (recover=stop_and_report, retryable=false, and a fixed next_step). A transfer fences the giver and does not reserve the path: other sessions keep reading and writing it by the ordinary rules, and the handoff only labels what they do. SINGLE-HOST only. Out of guarantee and NOT detected in v1: writers on different hosts or across a synced/network mount, divergent-history reconciliation, semantic correctness, s…

  • swg_gate

    Verify a file is STILL unchanged and still under the same grant. Pass BOTH comparands from your earlier swg_read — expected_version AND expected_generation (its owner_generation). Call this immediately BEFORE any irreversible external action you decided from that read (sending a webhook, opening a PR, running a deploy, posting a message). Returns decision=proceed, or DENIES with reason=stale_view if the file moved OR the grant you read it under was reclaimed (the version alone cannot see a reclaim) OR a peer write-claim preempted your grant (which moves neither comparand — the gate re-checks t…

  • swg_reacquire

    Recover from a stale_view deny: re-mint identity and return the CURRENT bytes. You MUST write FROM these exact bytes — the server enforces version lineage, NOT that your content was derived from what you read. SINGLE-HOST only. Out of guarantee and NOT detected in v1: writers on different hosts or across a synced/network mount, divergent-history reconciliation, semantic correctness, server-enforced auto-merge.

  • swg_read

    Read a workspace text file under coherence tracking. Returns {content, version, owner_generation}. The version is the comparand you pass to swg_write_cas; KEEP BOTH version and owner_generation and pass them to swg_gate before any irreversible external action you decide from this read (owner_generation=null means this coordinator does not report generations, so swg_gate will hold). When the path has a handoff record the result also carries handoff: the record as it concerns this session (role giver, successor or bystander, the two session_agent_ids, version_at_transfer, hold_shape, status, liv…

  • swg_statusread-only

    Report coherence state: coordinator on|off|unknown (unknown is NOT off), per-path enforced|not_registered (with handoff: the path's handoff record -- giver, successor, version_at_transfer, hold_shape, status, live -- when it has one; per_path is null, not {}, when the coordinator's /status answer carries no list of tracked paths, as a degraded answer does when its registry was busy: retry shortly and do not treat it as nothing tracked; the text result then says per_path=unavailable. With coordinator=unknown, per_path is {} and says nothing about what is tracked), is_attached/is_degraded/sessio…

  • swg_transfer

    Hand this session's claim on one or more paths -- the write grant from swg_write, or the standing read from swg_read -- to another session, the successor. Name the successor by the session_agent_id that the successor's OWN swg_status reports. Answers one grant per path, in order: transferred=true with the record (giver, successor, version_at_transfer, hold_shape, status=pending), or transferred=false with a typed reason and nothing changed (handoff_not_held: this session holds no claim on the path; handoff_successor_unknown: the coordinator does not know that id; handoff_in_flight: another ses…

  • swg_withdraw

    As the giver, withdraw this session's live handoff of a path: the handoff ends and this session's fence on the path lifts. Take it only on the user's or host's explicit instruction. It is never the recovery for the handed_off refusal: when a write of a path you handed off is refused, stop and report to your user or host. Refused with handoff_not_giver or handoff_not_live, as an error that changes nothing, whose next_step says to stop and report. A transfer fences the giver and does not reserve the path: other sessions keep reading and writing it by the ordinary rules, and the handoff only labe…

  • swg_write

    Write a workspace text file (acquire -> write -> commit). DENIED with reason=stale_view if the file changed since you read it — a peer commit OR an out-of-band edit (another tool/editor): recover with swg_reacquire, then write FROM its bytes. A mid-write preempt returns reason=commit_preempted (disk may hold un-versioned bytes; reacquire_and_reconcile). SINGLE-HOST only. Out of guarantee and NOT detected in v1: writers on different hosts or across a synced/network mount, divergent-history reconciliation, semantic correctness, server-enforced auto-merge.

  • swg_write_cas

    Concurrent same-key write via compare-and-set. You read (swg_read returns the version comparand; swg_reacquire does NOT — it is for swg_write recovery), MERGE, then call swg_write_cas(path, expected_version, new_content). Stale-write-rejected: if a peer committed since your read, the CAS is a TYPED CONFLICT (reason=version_mismatch, current_version returned) — NOT an auto-merge; re-read at current_version, re-merge, and retry. A win on a path with a live handoff carries handoff: outcome=completed when this session is its successor, overtaken (with counterparty) otherwise. The per-session confl…

Signals

Stars
11
Forks
3
Open issues
87
Weekly downloads
251
Last commit
Oct 23, 2026 (6 days ago)
Last release
Oct 14, 2026 (16 days ago)
Last package publish
Oct 14, 2026 (16 days ago)

From GitHub (fetched Oct 24, 2026) and the package registry.

Details

Registry name
io.github.Cohexa-ai/stale-write-guard-fs
Version
0.14.1
Auth
No auth
Packages
pypi agent-coherence
License
License unknown
First seen
Oct 24, 2026
Last checked
Oct 25, 2026
Cite this page

Agent Coherence — Stale Write Guard (FS) MCP server. Agent Mart. https://agentmart.dev/connectors/cohexa-ai-stale-write-guard-fs (last updated 2026-10-25)