The Problem: AI agents (Antigravity, Cursor, Claude Code) are moving faster than human cognition. Developers are falling into "Accept-Accept" fatigue—blindly approving complex diffs because auditing them line-by-line is too slow. We are trading codebase integrity for velocity.
The Solution: RECON AgentLens is a native VS Code extension that intercepts agent actions in real-time. It monitors the "Thinking" vs. "Doing" gap by comparing an agent's declared intent (captured from the terminal) with actual direct-to-disk modifications.
Standard diff tools and LLM summarizers are passive. RECON is active forensic oversight.
| Feature | Manual Review | Basic LLM Summarizer | RECON AgentLens |
|---|---|---|---|
| Interception | Passive | Passive | Active (FS Interposer) |
| Intent Mapping | Mental | None | Terminal Hooking |
| AST Awareness | Slow | Hallucination-prone | Deterministic (Tree-sitter) |
| Local-First | Yes | Often Cloud-based | 100% Local (Gemma) |
| Drift Detection | Hard | Impossible | Automated |
RECON operates through a three-stage automated pipeline that turns raw diffs into actionable insights.
RECON doesn't wait for a "save" event. It maintains an in-memory snapshot and uses FileSystemWatcher to catch direct-to-disk writes. This is critical for CLI-based agents like Claude Code or Antigravity that modify files without opening them in the editor.
By hooking into onDidWriteTerminalData, RECON extracts the agent's "Narration." It identifies what the agent claims it is doing, creating a structured intent object to compare against the actual changes.
graph LR
A[Agent Action] --> B[Terminal Narration]
A --> C[File Modification]
B --> D{RECON Engine}
C --> D
D --> E[Impact Map]
D --> F[Drift Alert]
Instead of feeding an LLM a 1000-line file, RECON uses a "Tight-Window" strategy. It identifies the specific code nodes modified and feeds a local Gemma 2B model only the relevant function signatures and changed lines. This ensures zero latency and high accuracy on consumer hardware.
Agent Drift occurs when an agent solves the primary task but introduces "hallucinated technical debt"—unnecessary refactors, broken imports, or logic that exceeds the stated scope.
RECON treats Intent and Diff as two separate data objects. If the Diff contains logic that wasn't mentioned in the Intent, RECON flags it immediately on the Impact Map.
- Extension: TypeScript / VS Code API
- Interception: Native
FileSystemWatcher+onDidWriteTerminalData - UI: WebView + VS Code Design System
- Local Brain: Gemma 2B (Quantized for 8GB VRAM)
- Agent Focus: Optimized for Antigravity, Claude Code, and Aider.
- Install: Build the extension (
npm run compile). - Launch: Press
F5to open the Extension Development Host. - Activate: Open the Command Palette (
Ctrl+Shift+P) and runRECON: Show Impact Map. - Audit: As you run your agent, watch the reports stream in real-time.
- Phase 1: The Watcher - Native FS watcher + memory snapshotting.
- Phase 2: Intent Capture - Terminal data stream interception.
- Phase 3: The Impact Map - WebView dashboard for live reporting.
- Phase 4: AST Deep-Dive - Tree-sitter integration for structural analysis.
- Phase 5: Automated Rollback - One-click reversal of unapproved agent actions.
"The goal isn't to slow the agent down. The goal is to speed the human up to match the agent."
