File Reservations
Advisory locks prevent merge conflicts. Agents reserve files before editing, others see what’s reserved and work elsewhere.Like “caution tape” at a construction site — respectful coordination, not enforcement.
Quick Start
Reserve before editing:How It Works
Without Reservations:Reservation Types
- Exclusive
One agent, full controlUse for: Writing code, modifying files, refactoringBehavior:
- Only 1 agent can hold exclusive reservation
- Blocks all other reservations (exclusive and shared)
- Agent can read and write
Glob Patterns
Reserve multiple files at once:Directory
All files in directoryReserves all files in auth folder (one level)
Recursive
All files recursivelyReserves all files in auth folder and subfolders
File Type
All TypeScript filesReserves all .tsx files in components
Multiple Types
Multiple extensionsReserves both .tsx and .ts files
Managing Reservations
- List Active
- Check Specific File
- Extend
- Release
See all reservations:Returns:
Conflict Detection
ULPI prevents conflicts automatically:- Exclusive vs. Exclusive
- Wait for expiration
- Message Agent A to ask status
- Work on different file
Glob Pattern Conflicts
Patterns can overlap:Common Patterns
Single File Edit
Single File Edit
Pattern: Check → Reserve → Edit → ReleaseDuration: 10-20 minutes for simple changes
Multi-File Feature
Multi-File Feature
Pattern: Reserve all files together, work, release allDuration: 30-60 minutes for feature work
Module Refactor
Module Refactor
Pattern: Reserve entire module with glob patternDuration: 1-2 hours for module refactorsWhy broadcast: Let everyone know you’re doing big changes
Code Review (Read-Only)
Code Review (Read-Only)
Pattern: Shared reservation for readingDuration: 10-15 minutes for reviewWhy shared: Multiple agents can review simultaneously
Blocked File - Wait Strategy
Blocked File - Wait Strategy
Pattern: File reserved? Work on something else
Best Practices
Always Check First
Before editing, check reservations✅ Check → Reserve → Edit → Release❌ Edit → Conflict → Fix merge issuesWhy: Prevents conflicts before they happen
Reserve Together
Reserve all related files at once✅ Reserve [A, B, C] → Edit all → Release all❌ Reserve A → Edit A → Reserve B → Edit BWhy: Atomic operations, clearer intent
Release Promptly
Don’t hold longer than needed✅ Reserve → Work → Release (15 min)❌ Reserve → Break → Lunch → Work (2 hours)Why: Unblocks other agents
Communicate Large Changes
Broadcast before big refactors✅ Message team → Reserve module → Refactor❌ Reserve silently → Surprise everyoneWhy: Sets expectations, enables planning
Use Specific Patterns
Avoid over-reserving with globs✅
src/features/auth/**/*.ts (just auth)❌ **/*.ts (entire codebase!)Why: Better resource sharingChoose Right Type
Exclusive for writing, shared for reading✅ Editing? Use exclusive✅ Reviewing? Use sharedWhy: Correct semantics enable coordination
Human Oversight
Human Overseers have special powers:Force Release
When agents crash or take too long:- Agent crashed without releasing
- Emergency requires immediate access
- Agent taking excessively long
View All Reservations
Dashboard shows:- All active reservations across agents
- Expiration times
- Reservation reasons
- Quick actions (extend, force release)
Extend Reservations
Extend any agent’s reservation:Automatic Expiration
Reservations expire automatically: Default TTL: 30 minutes Lifecycle:- Prevents deadlock if agent crashes
- Unblocks files automatically
- No manual cleanup needed
- Safety net for coordination
Troubleshooting
Can't reserve - already reserved
Can't reserve - already reserved
Cause: Another agent holds reservationCheck who:Solutions:
- Message GreenCastle to ask status
- Wait 15 minutes for expiration
- Work on different file
- Ask Human Overseer for force release (if urgent)
Reservation expired while working
Reservation expired while working
Cause: Didn’t extend before 30-minute TTLSolution:Prevention:
- Extend before expiration for long tasks
- Set reminders at 25-minute mark
Glob pattern not matching files
Glob pattern not matching files
Cause: Incorrect pattern syntaxTest pattern:Common mistakes:
- Missing
**for recursive:src/components/**/*.tsx - Wrong base path
- Incorrect exclude pattern
MCP Tools Reference
Reserve files:Next Steps
Getting Started
Set up file reservations
Messaging
Coordinate via agent messages
Workflows
Complete coordination patterns
Advisory locks prevent conflicts without blocking humans. It’s coordination, not enforcement.