edit_collision_guard
Prevent editing conflicts by snapshotting files after reading and checking for external modifications before any edit. Works with edit_transaction to ensure safe updates.
Instructions
Two-step guard: record_read (snapshot) after reading, check before editing. Detects external edits. Pairs edit_transaction.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | File path relative to workspace_dir | |
| action | Yes | record_read: snapshot after reading; check: verify before editing | |
| session_id | No | Optional session ID for multi-agent isolation (default: "default") | |
| workspace_dir | Yes | REQUIRED: project root (abs). reindex first if new. |