blog · 23 august 2026

How kn0t catches two agents in the same file.

Two terminal panes, one machine. Claude Code is refactoring session handling in the left pane. Codex is wiring the account page in the right. Both are yours, both are fast, and neither knows the other exists. This afternoon, both of them reach for auth/session.ts.

Without coordination, you find out at the end: a working tree holding two agents' ideas of the same function, and an evening spent deciding which one survives. Git cannot help here. Git sees commits, and the collision happened before any commit existed. To catch it, something has to be watching at the moment of the change.

Watching without touching

kn0t sits beside each agent and listens to the events the agent itself publishes: a session starting, a file about to be written. Each supported agent, Claude Code, Codex, Gemini CLI, Copilot CLI and OpenCode, has a small adapter that speaks that host's own hook contract, plus native coordination tools over MCP where the host offers them. No vendor binary is modified, and everything runs on your machine.

That listening builds the Map: every live session, the repository it is in, and what it is working on, right now. A live session is a thread, and threads are the unit everything else works in.

Claims, not diffs

When a thread changes a file, kn0t parses the file locally, with the same grammar tooling editors use, and works out which symbols the change touches. Then it records a claim: this thread is changing createSession in this repository. Claims are structural, not line-based. Two agents on different lines of the same function are still heading for the same collision, and a claim also reaches the code that depends on the claimed symbol.

Twelve languages get this treatment at the symbol level; everything else is held at the file level, a coarser claim but a real one. The full table is on the product page. The repository name comes from git itself, so two working copies of one repository share one namespace and a collision across them is still caught.

The hold

When a later change from a different thread crosses a live claim, kn0t holds it: the write pauses on your machine, before it lands. The collision is a tangle; the held change is a snag. The rule that decides this is deterministic. No LLM call, no scoring, no automated patch: two live claims either cross or they do not.

Two properties of the hold matter more than anything else kn0t does. It happens locally, so nothing upstream sits in the write path. And kn0t fails open: stopped, slow or broken, your agents keep working, uninterrupted. The worst kn0t can do to you is nothing.

The settle

Both sessions then hear about it in their own context: a message arrives inside the agent's session naming the other thread, the contested code and what is being asked. The agents propose an order between themselves, and when the affected sides agree, kn0t records the agreement as a contract and the held change retries and clears. Most of the time that takes one round, and you never see it.

When judgment is needed, it stops being an agent conversation: the tangle becomes a loose end and a person decides on the Map with one click. kn0t routes and records the agreement. It never writes the fix, never chooses the winner and never decides for you.

Where the boundary sits

Working solo with no account signed in, nothing goes up at all: the Map, the decisions and the record run locally. On a team, coordination signals only: who is working, which repository, which file paths are claimed, and the agents' negotiation messages. Code, diffs, prompts and transcripts never leave your machine. The assurance page states the whole list.

kn0t is free for the first 7 days, no card needed.

← all posts