Interlock · Experiment E8실험 E8

Interlock, Shepherd and Foremerge on the same tasks같은 작업에서 Interlock, Shepherd, Foremerge 비교

Shepherd and Foremerge also help AI coding agents coordinate. E8 runs all three tools, and no tool, on the same tasks with the same model and number of runs, each tool installed the way its makers describe. Shepherd와 Foremerge도 AI 코딩 에이전트의 조정을 돕는 도구입니다. E8은 세 도구와 도구 없음을 같은 작업, 같은 모델, 같은 횟수로 돌렸고, 각 도구는 제작자가 안내하는 방식 그대로 설치했습니다.

Run on 2026-10-19 with Interlock V3.1.0 (commit d9f3cea), Shepherd at commit 407ee77 (npm @korso/shepherd 0.11.4, local hub on Postgres 16), Foremerge 0.5.1 (commit 577de84), and real Claude Code 2.1.303 sessions on Sonnet 5.5: 72 sessions, $5.00 reported cost.2026-10-19 실행. Interlock V3.1.0(커밋 d9f3cea), Shepherd 커밋 407ee77(npm @korso/shepherd 0.11.4, Postgres 16 위의 로컬 hub), Foremerge 0.5.1(커밋 577de84), 실제 Claude Code 2.1.303 세션(Sonnet 5.5). 세션 72개, 보고 비용 $5.00. Raw results E8a (JSON)원자료 E8a (JSON) · E8b (JSON)E8b (JSON) · Shared note (JSON)공유 메모 (JSON) The shared-note condition ran on 2026-10-21 with Claude Code 2.1.304 on the same tasks, model and number of runs: 12 sessions, $0.84.공유 메모 조건은 2026-10-21에 Claude Code 2.1.304로 같은 작업·모델·횟수로 돌렸습니다. 세션 12개, $0.84.

Method방법

  • Teammate: a script, not a model, stays alive for the whole run and tells each tool the same sentence in that tool's own way:동료: 모델이 아닌 스크립트가 시행 내내 살아 있으면서, 각 도구에 자기 방식으로 같은 문장을 알립니다.
    • Interlock: a claim and a declared signature (E8a), or the changed line range (E8b).Interlock: 점유와 선언된 시그니처(E8a), 또는 바뀐 줄 범위(E8b).
    • Shepherd: a work claim (intent and file globs) and an announce, kept alive by heartbeats.Shepherd: work 점유(의도와 파일 glob)와 announce. heartbeat로 살아 있음을 유지합니다.
    • Foremerge: agent register, intent publish (scope symbol:login=migrate, file:…=modify), work claim and start; in E8b also a ChangeSet.Foremerge: agent register, intent publish(scope symbol:login=migrate, file:…=modify), work claim와 start. E8b에서는 ChangeSet도 냅니다.
    • Shared note (no tool): the same sentence as a line in COORDINATION.md, and a CLAUDE.md rule in the agent's checkout to read that file before any task.공유 메모 (도구 없음): 같은 문장을 COORDINATION.md에 한 줄로 적고, 에이전트 체크아웃의 CLAUDE.md에 작업 전에 그 파일을 읽으라는 규칙을 넣었습니다.
  • Setup: each tool's own Claude Code setup, with MCP tools allowed for all three and a new HOME and repository for every run.설치: 각 도구의 Claude Code 설정을 그대로 썼습니다. 세 도구 모두 MCP 도구를 허용했고, 시행마다 새 HOME과 새 저장소를 썼습니다.
    • Interlock: what interlock init sets up (hooks, MCP server, AGENTS.md rules).Interlock: interlock init이 설치하는 것(훅, MCP 서버, AGENTS.md 규칙).
    • Shepherd: its user-scope MCP server, the SessionStart and PreToolUse hooks it installs on first connection (installed in advance), and .shepherd in the repository.Shepherd: user 범위 MCP 서버, 첫 연결 때 스스로 설치하는 SessionStart·PreToolUse 훅(미리 설치), 저장소의 .shepherd.
    • Foremerge: foremerge init, setup claude (MCP server and skill), checks set.Foremerge: foremerge init, setup claude(MCP 서버와 스킬), checks set.
  • One change in Shepherd's favor: HEARTBEAT_INTERVAL_SECONDS=5, a documented setting (default 60), so that its hook notices arrive even in short sessions.Shepherd에 유리하게 바꾼 것 하나: 문서화된 설정 HEARTBEAT_INTERVAL_SECONDS=5(기본 60초). 짧은 세션에서도 훅 알림이 전달되게 하려는 것입니다.
  • E8a: the four tasks of E1. The teammate is changing login(user, password) to login(user, password, otp).E8a: E1의 작업 4종. 동료가 login(user, password)를 login(user, password, otp)로 바꾸는 중입니다.
  • E8b: the same-line and far-apart edits of E2. The teammate has committed TIMEOUT = 60 on its branch, not yet merged.E8b: E2의 같은 줄 편집과 떨어진 줄 편집. 동료가 TIMEOUT = 60을 자기 브랜치에 커밋해 두었습니다(병합 전).
  • Judged by code: argument binding for calls, and git merge-tree for conflicts.판정은 코드가 합니다: 호출은 인자 바인딩, 충돌은 git merge-tree.

E8a. Does the agent write to the signature a teammate is changing?E8a. 동료가 바꾸는 중인 시그니처에 맞게 쓰는가

12 runs per condition: 4 tasks × 3.조건마다 12회: 작업 4종 × 3.

Condition조건 Calls fit the new signature새 시그니처에 맞음 Runs with an old-form call옛 형태 호출이 있는 시행 Teammate's change reached the agent동료 소식을 받음 Refused거부 Avg. turns평균 턴 Avg. time평균 시간 Avg. cost평균 비용
No tool도구 없음0/12120/120/123.720 s$0.057
Shared note (no tool)*공유 메모 (도구 없음)*0/121212/120/125.219 s$0.070
Interlock12/12012/121/127.536 s$0.091
Shepherd0/121212/120/126.228 s$0.075
Foremerge0/12120/120/124.222 s$0.066
  • A shared note did no better: the agent read it in 12 of 12 runs and wrote the old call in 12 of 12. With no tool, the teammate's same sentence was a line in COORDINATION.md, and the CLAUDE.md in the agent's checkout said to read that file before any task. The agent read it every time and usually mentioned it in its report ("COORDINATION.md lists an unmerged change…"), then wrote the call for the signature on disk. *Run on 2026-10-21, after the other conditions (see Limits).공유 메모도 마찬가지였습니다. 에이전트는 12번 모두 메모를 읽었고, 12번 모두 옛 형태로 썼습니다. 도구 없이 동료의 같은 문장을 COORDINATION.md에 한 줄로 적고, 에이전트 체크아웃의 CLAUDE.md에 "작업 전에 이 파일을 읽어라"를 넣었습니다. 에이전트는 매번 메모를 읽고 보고에 대개 언급했지만("COORDINATION.md에 병합 전 변경이 있다"), 디스크에 있는 시그니처대로 호출을 썼습니다. *다른 조건보다 나중인 2026-10-21에 실행했습니다(한계 참고).
  • Shepherd delivered the teammate's change in 12 of 12 runs, and the agent still wrote the old call in 12 of 12. The notice arrived through its PreToolUse hook or the result of work. The agent's final report usually said the teammate was changing login to login(user, password, otp), that the call would need fixing after the merge, and that it had followed the current signature it was asked to use.Shepherd는 12번 모두 동료 소식을 전했지만, 에이전트는 12번 모두 옛 형태로 썼습니다. 소식은 PreToolUse 훅 알림이나 work 결과로 전달됐습니다. 에이전트의 마지막 보고는 대개 "동료가 login(user, password, otp)로 바꾸는 중이라 병합되면 고쳐야 한다, 요청받은 현재 시그니처를 따랐다"였습니다.
  • Foremerge's notice reached the agent in 0 of 12. It has no hook, so the agent has to call its tools; the agent called them in 1 of 12 runs, and the scope it published did not overlap the teammate's symbol:login.Foremerge의 소식은 12번 모두 닿지 않았습니다. 훅이 없어서 에이전트가 도구를 직접 불러야 하는데, 부른 것은 12번 중 1번이었고 그때 낸 scope도 동료의 symbol:login과 겹치지 않았습니다.
  • With Interlock, 12 of 12 calls fit. Reading the file showed the declared signature; the one refused edit was rewritten by the agent, which then finished.Interlock은 12번 모두 맞게 썼습니다. 파일을 읽을 때 선언된 시그니처가 보였고, 거부된 편집 1번도 에이전트가 고쳐 쓰고 끝냈습니다.

E8b. When the agent's edit overlaps a line the teammate committedE8b. 동료가 커밋한 줄과 편집이 겹칠 때

6 runs per condition: 3 on the same line, 3 on a line far apart.조건마다 6회: 같은 줄 3, 떨어진 줄 3.

Condition조건 Same line: merge conflict같은 줄: 병합 충돌 Same line: agent made the edit같은 줄: 에이전트가 편집함 Far apart: conflict떨어진 줄: 충돌 Far apart: needless refusal떨어진 줄: 불필요한 거부 Avg. cost평균 비용
No tool도구 없음3/33/30/30/3$0.056
Interlock0/30/3 (refused 3/3)0/3 (3/3 거부)0/30/3$0.077
Shepherd3/33/30/30/3$0.064
Foremerge3/33/30/30/3$0.058
  • Shepherd: in all 3 same-line runs the agent reported the teammate's change to the same line, wrote that merging would conflict, and made the edit anyway. All 3 conflicted.Shepherd: 같은 줄 3번 모두 에이전트가 동료의 같은 줄 변경을 보고하며 "병합하면 충돌한다"고 적었지만, 그대로 고쳐서 3번 모두 충돌했습니다.
  • Interlock: it refused the same-line edit in 3 of 3, so nothing conflicted, and it did not stop any of the 3 far-apart edits. In the same-line runs the agent's change was not made; each agent reported which teammate was changing that line.Interlock: 같은 줄 편집을 3번 모두 거부해 충돌이 없었고, 떨어진 줄 편집 3번은 하나도 막지 않았습니다. 같은 줄 시행에서는 에이전트의 변경이 들어가지 않았고, 에이전트는 어느 동료가 그 줄을 바꾸는 중인지 보고했습니다.

What to watch주의할 점

  • A notice that arrives is not enough here. Shepherd's hook delivered the news every time, but the agent followed the user's request and the code on disk, and put the warning in its report.여기서는 소식이 닿는 것만으로 부족했습니다. Shepherd의 훅은 매번 소식을 전했지만, 에이전트는 사용자 요청과 디스크의 현재 코드를 따르고 경고는 보고에만 적었습니다.
  • Interlock costs more. In E8a its runs took about twice the turns and 1.6 times the cost of runs with no tool, and it called its MCP tools in every run.Interlock은 비용이 더 듭니다. E8a에서 턴은 도구 없음의 약 2배, 비용은 1.6배였고, 매 시행 MCP 도구를 불렀습니다.
  • Refusing is not finishing. In E8b Interlock prevents the conflict by refusing the edit, so the change waits until the teammate's branch merges or someone decides.거부는 완료가 아닙니다. E8b에서 Interlock은 편집을 거부해 충돌을 막으므로, 그 변경은 동료 브랜치가 병합되거나 누군가 결정할 때까지 기다립니다.
  • The results match how both tools describe themselves: Shepherd's coordination is "advisory, never a gate", and Foremerge "never locks a file or blocks an agent".두 도구가 스스로 밝힌 설계와 같은 결과입니다. Shepherd는 조정이 "advisory, never a gate"라고, Foremerge는 "never locks a file or blocks an agent"라고 설명합니다.

Limits한계

  • Three runs per task, one model (Sonnet 5.5), and headless claude -p sessions only.작업마다 3회, 모델 하나(Sonnet 5.5), 헤드리스 claude -p 세션만 썼습니다.
  • The teammate is a script. We did not run an E6-style comparison with two live agents.동료는 스크립트입니다. 두 에이전트가 실제로 동시에 일하는 E6형 비교는 하지 않았습니다.
  • We chose Foremerge's operation (migrate) and the wording, and Shepherd's 5-second heartbeat. Interlock ran with its full setup (hooks, MCP and rules), unlike E1's hooks only.Foremerge의 연산(migrate)과 문장, Shepherd의 heartbeat 5초는 우리가 정했습니다. Interlock은 훅만 쓴 E1과 달리 MCP와 규칙까지 깐 전체 설정입니다.
  • The shared-note condition ran two days after the others, on Claude Code 2.1.304 instead of 2.1.303, not interleaved with them.공유 메모 조건은 다른 조건보다 이틀 뒤에, Claude Code 2.1.303 대신 2.1.304로 따로 돌렸습니다. 섞어 돌린 비교가 아닙니다.
  • Eight setup-check sessions (about $0.6) ran before the experiment and are not in the results.실험 전 설치 점검으로 8세션(약 $0.6)을 돌렸고, 결과에는 넣지 않았습니다.
  • We build Interlock. Every verdict is computed by code, and the raw data holds every tool call, hook output and final report. The Interlock source and the experiment harness are not public.Interlock은 우리가 만든 도구입니다. 판정은 모두 코드가 했고, 원자료에 모든 도구 호출, 훅 출력, 마지막 보고가 들어 있습니다. Interlock 소스와 실험 도구는 공개하지 않습니다.