You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Entity-level merge for multi-agent parallel edits
#13557
When multiple Codex agents work in parallel on the same repo, they frequently touch the same files. Git's line-based merge creates false conflicts when two agents add different functions to the same file, even though the changes are completely independent.
This wastes tokens (agents retry or attempt to resolve non-conflicts), wastes time (human has to step in), and limits how much parallelism you can actually get out of multi-agent setups.
"I'm running agents doing merges right now... If you can avoid that more often it will definitely save both time and money."
The fix
weave is an entity-level merge driver for Git. Instead of diffing lines, it parses code with tree-sitter into entities (functions, classes, methods), matches them by name and structural hash, and merges per-entity.
Agent A adds getUsers() to service.ts, Agent B adds deleteUser() to the same file → clean merge (different entities)
Agent A modifies processPayment(), Agent B also modifies processPayment() → real conflict (same entity, different changes)
Benchmark: 31/31 clean vs git's 15/31 on real-world scenarios. 14 languages supported (TypeScript, JavaScript, Python, Go, Rust, Java, C, C++, Ruby, C#, PHP, Swift, Fortran + config formats).
Why this matters for Codex specifically
Codex already has multi-agent orchestration (agents.max_threads, the TUI overhaul in #12047). The more agents you run in parallel, the more likely they touch the same file. Entity-level merge directly increases the ceiling on useful parallelism.
It's a Git merge driver, so the simplest integration is zero-code: users run weave setup in their repo and it works on the next merge. But a deeper integration could use sem-core (the entity extraction library underneath) to do entity-aware task decomposition: "Agent A owns functions X, Y, Z in this file. Agent B owns functions P, Q, R." Conflicts become structurally impossible.
Prior art / validation
Elijah Newren (author of Git's merge-ort) and Taylor Blau (Git team) reviewed weave positively
GitButler team is evaluating integration (they can't use Mergiraf due to GPL, weave is MIT/Apache-2.0)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Problem
When multiple Codex agents work in parallel on the same repo, they frequently touch the same files. Git's line-based merge creates false conflicts when two agents add different functions to the same file, even though the changes are completely independent.
This wastes tokens (agents retry or attempt to resolve non-conflicts), wastes time (human has to step in), and limits how much parallelism you can actually get out of multi-agent setups.
From a recent HN discussion, a user running 10+ agents simultaneously said:
The fix
weave is an entity-level merge driver for Git. Instead of diffing lines, it parses code with tree-sitter into entities (functions, classes, methods), matches them by name and structural hash, and merges per-entity.
getUsers()toservice.ts, Agent B addsdeleteUser()to the same file → clean merge (different entities)processPayment(), Agent B also modifiesprocessPayment()→ real conflict (same entity, different changes)Benchmark: 31/31 clean vs git's 15/31 on real-world scenarios. 14 languages supported (TypeScript, JavaScript, Python, Go, Rust, Java, C, C++, Ruby, C#, PHP, Swift, Fortran + config formats).
Why this matters for Codex specifically
Codex already has multi-agent orchestration (
agents.max_threads, the TUI overhaul in #12047). The more agents you run in parallel, the more likely they touch the same file. Entity-level merge directly increases the ceiling on useful parallelism.It's a Git merge driver, so the simplest integration is zero-code: users run
weave setupin their repo and it works on the next merge. But a deeper integration could use sem-core (the entity extraction library underneath) to do entity-aware task decomposition: "Agent A owns functions X, Y, Z in this file. Agent B owns functions P, Q, R." Conflicts become structurally impossible.Prior art / validation
brew install ataraxy-labs/tap/weaveHappy to discuss further or help with a prototype integration.
All reactions