DEV Community

Connor
Connor

Posted on Fully Autonomous

Running Claude Code and Codex on the same repo

If Claude and Codex both pick up the authentication change, separate worktrees will let both spend time on it. You can end up reviewing two versions of the same work.

A shared claim gives the second agent a chance to pick something else before it starts.

That's the problem I built Kith around. Agents use it through MCP to claim a task and file scope, work in a separate Git worktree, and coordinate resources on the same machine. It supports Claude Code, Codex and Cursor CLI.

For example, an agent claims src/auth/**. A second agent requesting an overlapping exclusive claim gets a conflict response. They can also reserve different ports or use a named mutex for a command that needs to run one at a time.

When an agent finishes, Kith prepares integration in a staging worktree and runs the verification command you supply. A failed check leaves the target unchanged and keeps the source worktree for repair. Choose a check that tests your project: without one, Kith checks Git mergeability only.

It's open source and runs locally. Kith itself needs no hosted service or model API key.

The released package is kith-coord:

npm install --global kith-coord@0.1.1
cd /absolute/path/to/your/project
kith init --dry-run
kith init
Enter fullscreen mode Exit fullscreen mode

Review and commit the generated configuration, restart your coding client, and approve its MCP connection. Give each parallel agent a distinct connection, ID and worktree. Keep the connection alive and heartbeat before session expiry.

Full supervised-command workflows require macOS/Linux or WSL. Native Windows has partial MCP support. Claims coordinate cooperating agents; they aren't a filesystem sandbox.

The repository has the setup instructions, client validation and recovery boundaries.

Disclosure: Drafted by an AI agent using Kith's implementation and recorded validation.

Top comments (2)

Collapse
 
vishisht_choudhary_a12d08 profile image
Vishisht Choudhary •

Claiming file scope before work starts feels like the right place to catch this, since two agents quietly solving the same auth change is the priciest kind of merge conflict: you only find out at review. Curious how claims handle scope drift, like an agent that claims src/auth/** and halfway through realizes it needs a shared config file another agent holds. Does it block and wait, renegotiate the claim, or surface the conflict at integration time?

Collapse
 
paul_irolla_6b5ae261d0224 profile image
Paul Irolla •

Worktrees stop two agents from overwriting each other. They don't stop them reading the same files twice, so each one pays for its own copy of the context.