Repository navigation
v1.21.7 — agent-sync
acquirerefuses the shared fallback identity where hooks know their session. From
a shell with noCLAUDE_SESSION_ID,acquirewon the lease under the shared fallback,
while the PreToolUse guard — which runs with the session id — refused every edit with
"this run holds no lease" (reported 2026-10-11 from a linked worktree). When any session
stamp is in reach,acquirenow exits 2 and names the remedy (CLAUDE_SESSION_ID, or
AGENT_SYNC_RUN_IDfor a non-Claude caller). Where no hook stamps sessions, nothing
changes: CLI and hook share the fallback and agree.- A linked worktree reads the main checkout's session stamp. A session started in the
main checkout stamped that checkout's state dir; the walk from a worktree read only its
own and fell back to the shared identity. The walk now reads both.
Two cases in test/hooks_session_test.py, both watched failing first.
- A direct
guard <path>in a repository with no coordination allows.guard.sh
already exited early there, butagent_sync.py guard <path>called directly still
exited 2 with a lease message no lease could satisfy. Recovered from the unmerged
2026-09-11 branch: a missing config isNotCoordinated, an answer the guard allows;
an unreadable config still denies.test/guard_uncoordinated_test.py(4 cases, 2
failing on 1.21.6) joinsnpm test.