Documentation
¶
Overview ¶
Package claudelock takes the mkdir locks Claude Code holds while it saves its files, taken as Claude Code takes them (2.1.316, its bundled proper-lockfile): a lock is a directory made with mkdir, held while it stands and let go by removing it. Its holder touches it every few seconds; one not touched for longer than the lock's stale time is left by a holder that died, and is taken over.
Index ¶
Constants ¶
const ( // RefreshStale is how long a lock Claude Code refreshes its sign-in // under may stand untouched (.oauth_refresh.lock, ~/.claude.lock). RefreshStale = 60 * time.Second // ConfigStale is how long the lock Claude Code saves ~/.claude.json // under may stand untouched. ConfigStale = 10 * time.Second )
Variables ¶
var ErrHeld = errors.New("Claude Code is saving its settings: try again in a moment")
ErrHeld is a lock Claude Code held past Wait.
var ( // Wait is how long a caller waits for Claude Code to let a lock go. // A refresh holds them for one token request; Claude Code itself // gives up after five tries a second or two apart. Wait = 20 * time.Second )
Functions ¶
Types ¶
This section is empty.