Shadow Sentinel – Linux filesystem revision guard with loop-coupling Shadow Sentinel is a new zero-dependency Python daemon that uses Linux kernel inotify to capture atomic .bak revisions and unified .diff files on every file modification, letting developers undo destructive writes from AI coding agents with a single `sentinel restore ` command. The tool seals the previous version of a file before it closes, debounces rapid writes with a 3-second quiet window, caps storage at 10 revisions per file, and uses a `sentinel_marker` file to set a per-directory size ceiling that ejects oversized files from the vault. Its loop-coupling design re-captures the overwritten version during a restore, so a mistaken restore can itself be undone. Autonomous OS-Level Revision & Backup Daemon with Decentralized Marker Control and Loop-Coupling. Shadow Sentinel monitors directory trees in real-time via the Linux kernel inotify , captures atomic .bak revisions and unified diffs .diff on every file modification, and provides instant 1-command restores with loop-coupling safety. Autonomous AI coding agents, Copilots, and LLM automation pipelines are transforming development. However, they introduce a terrifying new failure mode: silent, automated destruction of code . Large Language Models have a notorious habit of code "laziness" and structural truncation: - Replacing hundreds of lines of critical logic with: // ... rest of implementation remains unchanged ... - Overwriting multi-thousand-line configuration files with incomplete, summarized snippets. - Truncating files or writing empty 0-byte files when token limits, parser errors, or API timeouts occur. - Hallucinating breaking parameter changes across multiple scripts simultaneously. - If you catch it immediately: You still waste stressful hours digging through editor undo buffers, stash queues, or attempting to manually reconstruct what the model wiped out. - If you catch it hours or days later: The damage is catastrophic. The agent continued running, git working trees are dirty, commits were never made, and the original, working code is gone forever. Regular backups taken once a day or once a week cannot save intraday edits. Shadow Sentinel runs silently in the background directly under the agent's feet at the OS level. The microsecond an AI agent or automated script calls write or overwrites a file: 1. Sentinel's kernel-level inotify intercept catches the write before the file closes. 2. The previous working version is sealed into an atomic, timestamped .bak revision. 3. A human-readable unified .diff is generated showing exactly what the agent altered or removed. 4. If an agent ruins a file, you restore it with a single command: sentinel restore