Documentation Index
Fetch the complete documentation index at: https://mintlify.com/virsanghavi/axis/llms.txt
Use this file to discover all available pages before exploring further.
force_unlock removes a file lock held by another agent without the holder’s cooperation. It exists for one specific scenario: an agent crashed mid-task while holding a lock, and waiting for the 30-minute auto-expiry would block work. Every call is logged to the audit trail, which is why the reason parameter is required — the audit entry is how you justify to the team that the unlock was legitimate.
Parameters
Path of the locked file to force-unlock, relative to the repo root or absolute. Must match the path recorded in the lock (check with
list_locks).Why you are force-unlocking. This is logged to the audit trail and to the project notepad. Be specific — “agent crashed 28 minutes ago” is useful; “needed the file” is not.
The admin agent performing the unlock. Recorded in the audit log.
The Axis project scope. Defaults to the auto-detected project name.
Return value
| Field | Description |
|---|---|
status | "unlocked" on success. |
filePath | The file that was unlocked. |
previousHolder | The agentId that held the lock before the force-unlock. |
Force-unlock policy
force_unlock is a last resort, not a convenience. The conditions that justify its use are narrow:
Required conditions
- Lock is older than 25 minutes (visible in
list_locksviaacquiredAt) - Locking agent is clearly crashed — not responding, process gone
- You have checked that the agent is not just slow or in a long operation
Never acceptable
- Lock is recent and the holder is active
- You want the file sooner than the holder will finish
- You disagree with the holder’s approach
- Any reason other than a genuine crash
With
AXIS_ENFORCE_LOCKS=1 enabled, a crash can leave a file physically chmod’d read-only on disk. force_unlock restores the original file permissions in addition to removing the lock record — so the file becomes writable again for whoever claims it next.Alternatives to force-unlock
Before reaching forforce_unlock, work through these options in order:
Coordinate via update_shared_context
If the lock is recent, the holder may still be active. Post a message to the shared notepad explaining you need the file. Another agent on the same session may see it.
Wait for auto-expiry
All locks auto-expire 30 minutes after grant. If the lock is less than 25 minutes old, waiting is usually faster than the coordination overhead of a forced unlock.
Work on something else
list_jobs to find a job that doesn’t touch this file. Come back after the lock expires naturally.Local crash recovery: delete the state file
If the local stdio server itself crashed and left locks in an unrecoverable state, delete
history/nerve-center-state.json. This discards all local jobs and locks and resets the coordination board to empty. Use only when no other agent is actively using the local server.Example
Audit trail
Everyforce_unlock call is recorded in two places:
- Lock events log — a
FORCE_UNLOCKEDevent with the file path, the admin agent, and the reason. Visible in the Axis dashboard under your project’s audit history. - Project notepad — a
[FORCE UNLOCK]entry appended to the live notepad, visible to all agents viaget_shared_context.
CONFLICT for an active agent, the reason field is what distinguishes a legitimate crash recovery from a coordination failure.