Bartender: Continuous Worktree Reconciliation with Author-Routed Conflict Handback for Resident Multi-Agent Development

When several coding agents edit one codebase, current tools use one of two arrangements. A shared working copy keeps every agent on the same state but lets them overwrite each other. Per-agent Git worktrees isolate work but are merged only on demand, one worktree at a time, and discarded afterwards, so branches drift apart between merges. This paper describes Bartender, the synchronization mechanism of Kota, an open-source environment for resident coding agents—agents that persist in a workspace across tasks and sessions. Bartender keeps a persistent worktree for each agent and synchronizes all worktrees frequently: it integrates every worktree that applies cleanly onto the shared branch, holds the ones that conflict, and hands each conflict back to the agent that authored it, together with the current base and the failing commit. We state the mechanism's premises and give a mathematical account of why it is designed this way. A discrete-event simulation then tests the expected benefits of frequent synchronization, and of real-time conflict resolution by the owning agent, against on-demand synchronization and human review. In the simulation, in-place repair needs up to 2.8 times as many repairs and 12 times as much repair work as Bartender at high overlap, and repairing each conflict at once keeps virtually every conflict resolvable within the observation window, where a wait of four characteristic times leaves 48–73 percent unresolved.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-09-16
DOI
https://doi.org/10.5281/zenodo.22802897
Primary Topic
Multi-Agent Systems and Negotiation
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
preprint

Bartender: Continuous Worktree Reconciliation with Author-Routed Conflict Handback for Resident Multi-Agent Development

Nan Wu
Zenodo (CERN European Organization for Nuclear Research)
Multi-Agent Systems and Negotiation
preprint

Bartender: Continuous Worktree Reconciliation with Author-Routed Conflict Handback for Resident Multi-Agent Development

Nan Wu
preprint en

Abstract

When several coding agents edit one codebase, current tools use one of two arrangements. A shared working copy keeps every agent on the same state but lets them overwrite each other. Per-agent Git worktrees isolate work but are merged only on demand, one worktree at a time, and discarded afterwards, so branches drift apart between merges. This paper describes Bartender, the synchronization mechanism of Kota, an open-source environment for resident coding agents—agents that persist in a workspace across tasks and sessions. Bartender keeps a persistent worktree for each agent and synchronizes all worktrees frequently: it integrates every worktree that applies cleanly onto the shared branch, holds the ones that conflict, and hands each conflict back to the agent that authored it, together with the current base and the failing commit. We state the mechanism's premises and give a mathematical account of why it is designed this way. A discrete-event simulation then tests the expected benefits of frequent synchronization, and of real-time conflict resolution by the owning agent, against on-demand synchronization and human review. In the simulation, in-place repair needs up to 2.8 times as many repairs and 12 times as much repair work as Bartender at high overlap, and repairing each conflict at once keeps virtually every conflict resolvable within the observation window, where a wait of four characteristic times leaves 48–73 percent unresolved.

Zenodo (CERN European Organization for Nuclear Research)
Peace, Justice and strong institutions
Multi-Agent Systems and Negotiation
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.