Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Klepai v0.0.2: what happens when two agents edit the same folder

Description and use

Klepai v0.0.2 adds a collision guard that warns when two agents edit the same folder, offering isolation via git worktrees to prevent overwrites.

Problem

Two agents launched by Klepai can concurrently edit the same project folder, risking overwritten changes.

Outcome

The collision guard prevents accidental overwrites by alerting users to concurrent agent activity and offering safe isolation via git worktrees, preserving the integrity of the main project folder.

Workflow

  • Launch Klepai agent in a project folder
  • Klepai checks registry for existing agents on the same path or subpaths
  • If a collision is detected, display warning with options: Run anyway, Run in worktree, Cancel
  • If Run in worktree is chosen, copy project to sibling folder on branch "klepai/agent‑N"
  • Agent performs file operations on the worktree copy
  • Upon agent completion, commit changes to the worktree branch
  • Prompt user to merge changes into main project or keep branch
  • If merge succeeds, clean up; if conflicts, abort and provide git commands for manual resolution

Evidence

Before an agent starts, Klepai checks whether another Klepai‑launched agent is already working in that folder or anywhere under it.

Source

Choosing the worktree copies the project to a sibling folder on its own branch, klepai/agent-N. The conversation's file operations run against that copy, so the main folder stays exactly as it was while the agent works.

Source

When the agent finishes, Klepai commits all changes on the worktree branch first. The main history stays untouched. Then it asks you: merge into the project, or keep the branch.

Source

  • Record date: 2026-11-03T18:29:06.025Z