Skip to content
capcom docs

capcom lock

Acquire, refresh, release and inspect this worktree’s Tree lock

Manage this worktree’s Tree lock: the advisory claim one agent session holds on one working tree while it edits. acquire claims it and prints a Lock token, touch renews its heartbeat with that token, and release frees it. A lock whose heartbeat is older than the TTL (lock.ttl in config.yaml, two hours by default) is stale: it stays held until its holder resumes it, another session takes it over with acquire –take-stale, or someone breaks it. Each git worktree has a lock of its own, and capcom installs no git hooks: the lock binds only the sessions that check it.

capcom lock [flags]
capcom lock acquire --purpose "implementing the release plan" # prints the token to keep
capcom lock touch --token <token> # renew the heartbeat
capcom lock status --all # every worktree's lock
capcom lock release --token <token> # free it when the work is done
-h, --help help for lock
--json print a versioned JSON envelope