How It Works
Automatic Command Lock
Every command that targets a box automatically acquires a command lock before it runs. This prevents two users from issuing conflicting commands to the same box at the same time.- All callers blocked: Any command targeting the same box is blocked until the first command finishes, even from the same user
- Auto-expires: After 30 minutes of inactivity, stale command locks are automatically cleaned up
- Released on completion: The lock is released when the command finishes or when you press
Ctrl+C
User Lock
A user lock is an explicit, persistent lock you place on a box. Unlike command locks, user locks do not expire — you must manually unlock the box when you’re done. Use cases:- Reserving a box for a long-running detached script
- Claiming a box for an extended debugging session
- Preventing others from using a box during maintenance
Commands
lager boxes lock
Lock a box to prevent others from using it.
--box(required) - Name of the box to lock
lager boxes unlock
Unlock a box to allow others to use it.
--box(required) - Name of the box to unlock--force- Force unlock even if the box was locked by another user
Bypassing Locks
--force-command
Use the global --force-command flag to bypass both command locks and user locks:
Management operations
The following operations skip lock checks entirely because they manage running processes rather than starting new ones:lager python --kill IDlager python --kill-alllager python --reattach ID
lager boxes list
When boxes are locked or busy, lager boxes list shows additional columns:
- Locked By — shows the user who placed an explicit lock (magenta)
- Busy — shows the user and command currently in progress (yellow)
Special Cases
--detach releases the command lock
When you run a command with --detach, the command lock is released immediately after the process detaches. This allows other users to use the box while your script continues running in the background.

