2:00 PM → Agent A edits UserProfile.tsx2:05 PM → Agent B edits UserProfile.tsxResult: Merge conflict 💥
With Reservations:
Copy
2:00 PM → Agent A reserves UserProfile.tsx2:05 PM → Agent B tries to reserve → Blocked2:05 PM → Agent B works on different file2:20 PM → Agent A releases2:21 PM → Agent B reserves → Success ✅
Duration: 1-2 hours for module refactorsWhy broadcast: Let everyone know you’re doing big changes
Code Review (Read-Only)
Pattern: Shared reservation for reading
Copy
// Reserve for readingreserve_file_paths({ file_patterns: [ "src/types/User.ts", "src/types/Auth.ts" ], reservation_type: "shared", reason: "Reviewing type definitions", duration_minutes: 15})// Read files for context[Review code, understand types]// Release when done readingrelease_file_paths({ file_patterns: [ "src/types/User.ts", "src/types/Auth.ts" ]})
Duration: 10-15 minutes for reviewWhy shared: Multiple agents can review simultaneously
Blocked File - Wait Strategy
Pattern: File reserved? Work on something else
Copy
// Try to reservecheck_file_reservations({ file_patterns: ["src/components/UserProfile.tsx"]})// Response: Reserved by GreenCastle, expires in 15 min// Option 1: Message GreenCastlesend_message({ recipient_ids: [GreenCastle_ID], subject: "UserProfile.tsx status?", body: "Are you still working on UserProfile.tsx? I need to edit it for export feature."})// Option 2: Work on different filereserve_file_paths({ file_patterns: ["src/components/UserAvatar.tsx"], reservation_type: "exclusive", reason: "Work on avatar while waiting for UserProfile"})// Option 3: Wait for expiration (15 min)[Wait 15 minutes, then try again]
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
// Human can force release any reservationforce_release_file_paths({ agent_id: "crashed_agent_id", file_patterns: ["src/components/UserProfile.tsx"], reason: "Agent crashed, unblocking file"})
2:00 PM → Reserve (expires 2:30 PM)2:25 PM → Should extend if still working2:30 PM → Auto-expires2:31 PM → File available again
Why auto-expiration:
Prevents deadlock if agent crashes
Unblocks files automatically
No manual cleanup needed
Safety net for coordination
If you need longer:
Copy
// Extend before expirationextend_file_reservations({ file_patterns: ["src/components/UserProfile.tsx"], additional_minutes: 30 // Now expires in 60 min total})