Overlap

Concurrent edits, caught before they clobber.

Coshell lets your whole team prompt agents on one codebase at once. Overlap is the layer that catches it when two of them reach for the same lines, and steers the second before a change is lost.

Why Overlap exists

Last-write-wins underneathSeveral people prompt agents on one shared codebase at once. The engine beneath them is last-write-wins, so two concurrent edits to the same lines silently clobber each other.
A guard on topOverlap is the layer that watches every agent write and catches the collision before it lands, instead of finding it after the damage is done.
Steered, not mergedIt negotiates intent, it does not merge code. The second edit is held and the agent is steered, so no change is ever silently combined or lost.
Retry-After on 429
feat/rate-limit TR
Add a Retry-After header to every 429 response.Tom Reyes
EditrateLimit.ts /src/middleware/+6−1
Overlap with Lena reconciled. Your Retry-After header was kept on the shared 429 response.
Claude Sonnet 5
Overlapsrc/middleware/rateLimit.ts
DetectedArbitratingReconciled
BetweenTom and Lena, both editing the 429 response path
KeptRedis-backed bucket from Lena, Retry-After header from Tom
WhyBoth changes touch the same response. One combined edit, no clobbered lines.
View diffUndo
Webhooks limiter
feat/rate-limit LF
Apply the limiter to /v2/webhooks and share the bucket.Lena Fischer
EditrateLimit.ts /src/middleware/+14−2
Overlap with Tom reconciled. The bucket change went in, with his header on the same path.
Claude Sonnet 5

Concurrent AI edits used to mean whoever saved last won, and the other change quietly vanished.

Now the collision is caught before it lands, and the second agent is steered.

How Overlap works.

Six things happen on every agent write, and every one of them is running in production today. None of it asks anything of the model, and none of it can stand between an agent and its edit.

The exact lines, not just the file

On every write, edit, and apply_patch, Coshell derives the precise line range the agent is about to change and checks it against every other active edit in your org. Same file, different lines, no collision. Same lines, and it acts.

Works the same across all 70+ models

The check runs in the tool layer, below the model, so it covers every agent you can run on Coshell the same way: Claude, Codex, the open models, all of them. There is nothing for an agent to opt into.

A referee reads what both sides want

When two ranges collide, a referee reads what each agent is actually trying to do, from the prompt and the change itself, and returns one of four calls instead of letting them race.

The directive goes straight to the agent

The call comes back to the second agent as its own result, in plain language: proceed, take other lines, wait, or let the first change land first. The agent reads it and adjusts, in the same turn.

It fails open, always

If the check is slow or the referee is unsure, the edit goes through. A missed overlap is recoverable in git, a frozen editor is not, so Overlap is built to never stand between an agent and its write.

A claim lasts only while work is live

A region is held only while an agent is actively working it, and released the moment the edit lands. Nothing stays locked, and a crashed or abandoned turn frees its lines on its own.

Four ways a collision resolves.

When two edits land on the same lines, a referee reads what both agents are actually trying to do and returns exactly one call. It never invents a merged result.

Maya’s agentTheo’s agent
proceed

The two changes do not actually conflict. The edit goes through and the other change is kept.

“Both edits are compatible. Go ahead.”
Maya’s agentTheo’s agent
split

The agents want different things in the same place. Each is steered to its own lines.

“Take lines 40 to 60. Maya's agent is holding 10 to 30 for the limiter refactor.”
Maya’s agentTheo’s agent
defer

One agent is mid-change on this region. The other is told to wait and retry in a moment.

“Hold off. Theo's agent is refactoring this function right now. Retry shortly.”
Maya’s agentTheo’s agent
reorder

The changes are better applied in sequence. The second is told to let the first land, then build on it.

“Let Maya's change land first, then rebase yours onto it.”
Across your sessions, your subagents, and your drives.

Overlap covers concurrent sessions in one drive, background subagents, and separate drives in your org that share the same repository, always scoped to your org and never across customers. On Enterprise, point the referee at your own model and key, so the reasoning about a collision never leaves your boundary. It is part of what makes the team work with the agent, not a setting you turn on.

More:

Compare:

Overlap, answered

Coshell catches it before the second edit lands. On every write, edit, or apply_patch, it derives the exact line range the agent is about to change and compares it to every other active edit in your org. If two ranges collide, a referee reads what both agents are trying to do and steers the second one: proceed if the changes are compatible, take other lines, wait, or let the first land first. The first change is never clobbered.

No. Overlap negotiates intent, it does not merge code, and it will never silently combine two changes into one result. It catches the collision and tells the second agent how to proceed. Auto-merge is an explicit non-goal: the point is that you always know what each change was, not that they got fused behind your back.

Yes, with all of them. The check runs in the tool layer beneath the model, so every one of the 70+ models you can run on Coshell is covered the same way, including Claude, Codex, and the open models. There is nothing the model has to support and nothing an agent opts into.

No. Overlap fails open. If the collision check is slow or the referee is unsure, the edit proceeds. A missed overlap is recoverable in git, but a blocked editor is a broken product, so Overlap is built to never stand between an agent and its write. A held region also expires on its own if an agent crashes or walks away.

Yes. Overlap covers concurrent sessions in one drive, background subagents, and separate drives in your org that have the same repository cloned into them. It matches by repository identity and the file's path in the repo, so the same lines of the same file collide wherever they are being edited, always scoped to your org and never across customers.

Let your team edit together, without the clobber.

Open a drive in the browser, or attach from the CLI. Put several agents on one codebase and watch Overlap keep their edits from landing on top of each other.