Why coding agents break untouched files
In Warden-S1, a local 415 MB model watched a single coding session to catch mistakes as they happened. Over several days, a different failure shows up: an agent edits file A, passes every local test, and quietly breaks an untouched file B whose name never appears in the diff.
Most teams patch this by stuffing old bug notes into every prompt (RAG). Three problems hit immediately: prompts grow almost 7x longer, keyword search misses differently worded edits, and old bug notes keep firing false alarms long after a refactor fixes the issue.
Fast daytime memory + nightly sleep
Training rules into weights overnight removes prompt bloat, but leaves you blind whenever a rule changes mid-day. Omen splits memory across two timescales so updates land in milliseconds and old rules clear out cleanly:
- Fast check (67 ms, 0 extra prompt tokens): One forward pass of
Qwen3-0.6Bplus an 8 MB adapter predicts which untouched files are at risk, with no text generation. - Instant daytime learning (1 ms, no retraining): When a new cross-file bug is found mid-day, a closed-form linear update (Sherman-Morrison) writes it into a tiny 0.6 MB fast-weight matrix. Mid-day recall jumps from 0% to 100%.
- Instant daytime forgetting (2.7 ms, no retraining): When a refactor retires an old rule, orthogonal projection (thin QR) erases just that rule while keeping active rules untouched. False alarms drop from 71.7% to 1.7% with 98.9% active retention.
- Nightly sleep and reset (< 5 min): Overnight, a short consolidation pass folds surviving daytime rules into the 8 MB adapter, suppresses retired ones, and resets the fast daytime matrix back to zero.
Controlled benchmark results (80 files)
Tested across 3 random seeds on GhostLocus-Bench v2 (60 cross-file rule families across FastAPI, Hono, Pydantic, Vite, and Zod; 80 candidate files; 260 held-out test edits):
| Method | Ghost R@1 | Alarm AUROC | Stale FPR | Wake Latency | Extra Tokens |
|---|---|---|---|---|---|
| Zero-Shot Base | 5.0% | 0.448 | 50.0% | 38.4 ms | 0 |
| Append-Only RAG | 26.4% | 0.617 | 37.8% | 115.0 ms | +747 |
| Naive SFT Replay | 91.4% | 0.718 | 36.1% | 71.0 ms | 0 |
| Omen + Bio-REM (Ours) | 97.5% | 0.906 | 0.6% | 67.0 ms | 0 |
Honest limits and what comes next (v2)
This paper is a controlled proof of the math, not a general replacement for RAG. The current checkpoint predicts risk and untouched filenames over an 80-file catalog; it does not yet store freeform documentation or change what a coding LLM generates directly.
Next in Omen v2: lifting this same 1 ms null-space write, orthogonal unlearning, and nightly reset loop out of a classifier head and directly into generative transformer layers, tested on public multi-hop and long-memory benchmarks.
Artifacts and citation
Paper #2 extends Warden-S1 (DOI: 10.5281/zenodo.24494405). The technical paper (PDF, Zenodo DOI), the 8 MB model weights (DevMortimer/Omen-REM-0.6B), and the GhostLocus-Bench v2 evaluation dataset (Hugging Face) are released under Apache-2.0.
@misc{gapac2026omenrem,
author = {Gapac, Ryan Joshua Z.},
title = {Omen, Instant-CLS \& REM-Engram: Dual-Timescale Codebase Memory for Coding Agents},
year = {2026},
month = nov,
doi = {10.5281/zenodo.24607074},
url = {https://doi.org/10.5281/zenodo.24607074}
}
How to Use Omen
Omen runs locally on any Git repository with zero cloud API keys and zero extra prompt tokens.
1. Pre-commit or PR check on any Git repo (omen_cli.py)
Download the standalone CLI from DevMortimer/Omen-REM-0.6B to scan git diff before pushing, teach new cross-file rules live in ~1 ms, and run nightly consolidation:
pip install torch transformers peft safetensors huggingface_hub curl -sLO https://huggingface.co/DevMortimer/Omen-REM-0.6B/raw/main/omen_cli.py python omen_cli.py check # scans git diff (~67 ms), lists risky files python omen_cli.py learn HEAD # learns a new rule in ~1 ms (Instant-CLS) python omen_cli.py sleep --days 7 # nightly Bio-REM + prunes refactored rules
2. Embed in Python or CI PR bots
Score any raw pull-request diff string directly in Python without modifying your main coding agent prompt:
from omen_cli import OmenMemory
omen = OmenMemory.from_pretrained("DevMortimer/Omen-REM-0.6B")
result = omen.check_diff(pr_diff_text, top_k=3)
if result["alarm_prob"] >= 0.5:
print("Check untouched files:", result["top_ghost_files"])