Bridle: A Fail-Closed POSIX Harness and Deterministic Integration Sensor for Autonomous AI Coding Agents
Autonomous AI coding agents often treat a locally compiling diff as a finished engineering task. An agent creates a new module, checks that the syntax is valid, sees isolated unit tests pass, and ends the turn reporting success---even when the module is never imported by any entrypoint, never registered in runtime wiring, still contains unresolved Git conflict delimiters, or defers implementation with NotImplementedError. We call this pathology hallucinated completion. Prompting an LLM to ``always wire your files and verify completion'' is prompt therapy: under token pressure and deep recursion, compliance decays. Nesting a second ReAct loop inside the IDE harness creates terminal contention, duplicates semantic indexes, and adds latency. This paper presents Bridle, a zero-dependency, fail-closed POSIX harness for agents running inside Cursor. Taking as given that an agent is the sum of a model and a harness, Bridle does not replace the host loop. It enforces mechanical invariants across four frozen hooks, anchors evidence to Git tree hashes, and adds a static integration sensor (complete_gate.sh) that emits a confidence score in $[0, 100]$ and a binary machine verdict (Act, exit 0, vs. Escalate, exit 3). On a 12-case benchmark corpus of framework edge cases, Bridle raises detection accuracy from 0.583 to 1.000, with 1.000 recall on incomplete work and a 0.000 false-positive rate, at 85 ms per-turn overhead across a 374-test formal gauntlet.
Authors
- Mario Quintero Pulice
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-09-17
- DOI
- https://doi.org/10.5281/zenodo.22803323
- Primary Topic
- Adversarial Robustness in Machine Learning
- Type
- preprint