Overview
What is Lanes? Shared context for coding agent teams
In shortLanes is free, open-source software (Apache-2.0) for teams where several people each run an AI coding agent, such as Claude Code, Codex, Cursor or Gemini CLI, in the same git repository. It tells every agent what the others are changing before it reads or edits a file, makes agents that want the same file wait about a second instead of overwriting each other, and lets one person's agent ask another person's agent for help once that person approves.
The problem Lanes solves
Coding agents are built for one person. Claude Code, Codex and Cursor each see one checkout, one conversation and one person's intentions. That works until a second person on the team starts their own agent in the same repository.
From then on, three things go wrong in practice:
- Two agents edit the same file at the same time. Each reads the file, changes it and writes it back. Whichever writes last wins, and the other agent's change disappears, often without anyone noticing until later.
- One agent changes code another agent depends on. Ana's agent renames
getUsertofetchUser. A minute later Bea's agent writes a new file that callsgetUser. Both agents report success. The build is broken, and nobody finds out until the pull request or the CI run. - Nobody can see what the agents are doing. There is no shared view of which agent is working on which task and which files. People coordinate by chat messages that the agents never read.
Git catches some of this at merge time, as conflicts. By then the agents have finished, the context is gone and a person has to untangle the result by hand.
What Lanes does
Lanes adds a coordination layer between the agents of one team. It has four parts.
A queue per file
Before an agent edits a file, its hook asks the Lanes server for a short lease on that file. If a teammate's agent holds it, the request waits in a first-come, first-served queue. The lease lasts one edit, so the wait is usually about a second. When it is the agent's turn, its checkout is first brought up to date with the teammate's change, so it edits the current version.
Lanes never refuses an edit. If the server is down, or the wait runs past four minutes, the edit goes ahead and is committed locally, so it cannot be lost.
Shared team context
With team context on for a repository, each prompt an agent receives starts with a short brief: which teammates' agents are working on what, which files they are touching, and any team chat message that mentions this person. Before an agent reads or edits a file a teammate's agent is changing, it gets a one-line heads-up that names the teammate's task, so it can write code that matches the change instead of the version it sees on disk.
The brief is capped at 2,000 characters. Text written by a teammate is always quoted as data with its author named, never phrased as an instruction.
Requests between agents
A person can ask a teammate's agent to explain or do something: "Explain how session expiry works" or "Run the cart tests against the new join". The request reaches that agent only after its owner approves it, and it may change files only if the sender allowed edits and the owner approved that. The reply comes back to the sender and their agent.
One picture of the team
The same state is visible everywhere: a VS Code sidebar, a browser app served by your own Lanes server, the lanes command line and the MCP tools agents can call. Each view shows who is working on what, which files are held or waited for, the team chat and open requests.
What Lanes is not
Lanes is not a coding agent and does not call a model. It does not replace git, a code host or code review: edits are published as ordinary commits to a branch called lanes/main on the remote you already use. It does not sync file contents through its own server.
Who it is for
Lanes is for teams of two or more people who each run a coding agent on the same codebase most days. It also helps one person who runs several agents in parallel worktrees, since the agents coordinate the same way.
A team of one with a single agent does not need it.
How you run it
Lanes is self-hosted. One person runs the Lanes server on a laptop, a desktop or a small VM, and everyone else points their agents at it. A single developer needs nothing extra: the first agent session starts a local server by itself.
The fastest start:
git clone https://github.com/mfmatozza/lanes
cd lanes && npm ci && npm run build
node dist/lanes.cjs init --agents claude
node dist/lanes.cjs team onThe CLI reference covers every command and the MCP reference shows how to add the team tools to 19 agents.
What has been measured
Lanes publishes its benchmark method, written before the runs, and every result, including the runs that failed.
- In the scenario where one agent renames a function while another writes a new caller, file locks alone broke the build in 6 of 13 runs. With Lanes' shared context it broke in 0 of 10.
- When edits were refused the old way, 4 of 13 agents stopped and asked their human what to do. With Lanes' queue, 1 of 216 agent sessions asked anything.
- With 64 agents writing to the same repositories at once, no edit was lost.
- The check before each edit adds 39 ms on Linux and 68 ms on Windows at the 95th percentile.
The details are on the benchmark page.
Questions
Is Lanes an AI coding agent?
No. Lanes does not write code and never calls a model. It sits next to the agents your team already uses and coordinates them through the hooks and MCP tools those agents already support.
Does my code go to a Lanes server?
No. The Lanes server receives repository identifiers, file paths, names, statuses and task titles. File contents travel only through your own git remote, the same way they do today.
Is Lanes free?
Yes. Lanes is open source under the Apache-2.0 licence and you run it yourself. There is no account and nothing to buy.
Do I need the VS Code extension?
No. The CLI and the MCP server do everything on their own, and the browser app shows the team in any browser. The extension adds a sidebar for people who work in VS Code.
Which agents work with Lanes?
Claude Code, run against the real agent. Codex, Gemini CLI, Cursor, GitHub Copilot, Kiro, Antigravity, Factory Droid, Qwen Code, opencode, Kilo Code and Amp through their own hooks or plugins. Augment, Junie, JetBrains AI Assistant, Continue, Zed, Goose and Warp through MCP.