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.
propose_file_access is the entry point to Axis’s file-locking protocol. Before any agent edits a file, it must call this tool to register its intent and claim the file as its own. If the file is free, the lock is GRANTED and a content hash is fingerprinted for tamper detection. If another agent already holds the lock, the response is REQUIRES_ORCHESTRATION — not a generic “denied”, but a structured message that names the locking agent, states their intent, and tells you exactly what to do next.
Parameters
Path to the file to lock, relative to the repo root or absolute. Must point to a file — directories and paths outside the repo root are rejected with
REJECTED.Lock multiple files in a single all-or-nothing batch call. If any file in the array is already locked by another agent, the entire batch is rejected and any locks acquired earlier in the same batch are automatically released. Use this for edits that must span several files atomically.
Identifier for the agent requesting the lock. Appears in denial messages shown to other agents, so use a recognisable name (e.g.
"dana-claude-code").A plain-language description of what you will do with the file. This text surfaces directly in
REQUIRES_ORCHESTRATION messages seen by other agents, so be specific — say what you are doing, not just “editing file”.The Axis project to scope the lock to. Defaults to the auto-detected project derived from the nearest
.git or package.json, or from a committed .axis/axis.json.Return values
| Status | Meaning |
|---|---|
GRANTED | Lock recorded. The file’s current content is hashed and stored for tamper detection. Proceed with your edits; prefer guarded_write to write the result. |
REQUIRES_ORCHESTRATION | The file is already locked by another agent. The response includes the locking agent’s ID, their intent, when the lock was acquired, when it auto-expires, and suggested next steps. |
REJECTED | The path is invalid — a directory, a path outside the repo root, or otherwise not a lockable file. |
REQUIRES_ORCHESTRATION message format
When a file is locked, the denial message is structured to be immediately actionable:- Locking agent ID — who holds the file
- Intent — what they are doing with it
- Time acquired — when the lock was granted
- Expiry time — when the lock auto-expires (30 minutes from grant)
- Suggested actions — what to do instead of forcing through
Batch locking
PassfilePaths (an array) instead of a single filePath to lock multiple files in one round-trip. The batch is all-or-nothing: if any file in the array is locked by another agent, every lock acquired earlier in the same call is immediately released, and the response identifies which file caused the failure.
Companion tools
verify_file_lock(agentId, filePath)
A tamper check to run immediately before writing, when not using guarded_write. Axis recorded a content hash when the lock was granted; verify_file_lock re-hashes the file on disk and compares the two.
| Return status | Meaning |
|---|---|
CLEAN | File is unchanged since the lock was granted. Safe to overwrite. |
CONFLICT | File changed since the lock was granted — another process wrote it. Re-read the file and reconcile your changes before writing. |
UNKNOWN | No fingerprint was recorded (remote-backed lock without hash storage). Integrity cannot be verified. |
guarded_write is the preferred alternative to calling verify_file_lock yourself. Because guarded_write performs the check and the write atomically, there is no race window between the two steps. Use verify_file_lock only when you must write through your own editor instead.release_file_access(filePath, reason?)
Releases a lock you hold before calling complete_job. Use this when you finish with a file but your job is still in progress — freeing the lock early lets other agents proceed without waiting for your job to close.
complete_job releases all locks associated with the job automatically, so release_file_access is only needed for early, mid-job releases.
Best practices
Write a specific intent
Describe what you are doing, not just that you are editing. “Refactor auth to issue JWTs” is useful to blocked agents; “editing file” is not.
On REQUIRES_ORCHESTRATION: move on
Pick a different file or job. Never force the write — the lock holder is actively working on that file and a clobber will produce a real conflict.
Prefer guarded_write
Use
guarded_write over the manual verify_file_lock → write pattern. It is atomic and eliminates the race window between the check and the write.On CONFLICT: reconcile first
If
verify_file_lock returns CONFLICT, re-read the file from disk and merge your changes before writing. Do not clobber the concurrent edit.Example flow
Make your changes in memory
Read the file, apply your edits, hold the result in memory. Do not write yet.
Write atomically through the lock
Use
guarded_write to write only if you still hold the lock and the file is unchanged: