AirGapHarness: Edge-Supervised Token Compression, Selective AST Pruning, and Privacy-Preserving Execution for Autonomous Agents
State-of-the-art autonomous software engineering agents (e.g., OpenHands, SWE-agent, Aider) suffer from severe cloud token bloat: they repeatedly transmit uncompressed source files, unrelated boilerplate classes, raw execution traces, and routine verification turns to centralized frontier Large Language Models (LLMs). This paradigm incurs quadratic token inflation O(N * L), elevated API costs, attention dilution across large contexts, and unnecessary exposure of sensitive credentials. We introduce AirGapHarness, an edge-supervised agent architecture designed primarily for aggressive cloud token reduction while preserving bug-fixing fidelity and enforcing local credential privacy. By executing deterministic Selective Abstract Syntax Tree (AST) pruning, log deduplication, on-the-fly Small Language Model (SLM <= 2.6B) distillation, and local goal verification on commodity CPU hardware, AirGapHarness eliminates redundant context and routine verification round-trips prior to cloud egress -- while simultaneously redacting sensitive credentials via a reversible privacy vault. Across four empirical evaluations on commodity CPU hardware (Intel Core i5-1135G7, 0 MB discrete VRAM) and live OpenRouter cloud endpoints, AirGapHarness reduces cumulative cloud token consumption by 91.84% vs. OpenHands (p = 1.58e-6), 90.86% vs. SWE-agent (p = 1.66e-6), and 84.08% vs. Aider-style Repo-Map (p = 1.47e-6) across N = 30 tasks. Furthermore, it achieves 4/5 live Pass@1 using only 484-523 prompt tokens per task, a 2.87x wall-clock speedup, and 100.00% secret redaction (0 leaks vs. 360 in baseline).
Authors
- Debdip Bandyopadhyay (ORCID: https://orcid.org/0009-0007-7496-0767)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-28
- DOI
- https://doi.org/10.5281/zenodo.24635992
- Primary Topic
- Software Engineering Research
- Type
- preprint