Harness-of-Harness (HoH) Architecture: Long-Horizon Execution without Context Bloat
Executive Summary
When autonomous agents run complex, multi-day engineering or operational tasks, single prompt-loop designs inevitably fail. Token contexts overflow, error logs pollute working memory, and models end up in unproductive debugging cycles.
The Harness-of-Harness (HoH) architecture solves this by separating execution across three specialized agent roles. It isolates runtime logs using Progressive Disclosure, tracking state strictly through separate Artifact and Evidence pipelines.
Modern research in harness optimization validates that monolithic prompt loops entangle unrelated system mechanisms. The HoH architecture enforces a Modular Harness abstraction—decoupling the agent runtime into independently managed modules:
Agent Loop: Manages step iterations and error recovery.
Observation Management: Offloads raw terminal logs and isolates execution output.
Context Management: Handles Progressive Disclosure and Error Delta payloads.
Tool Use & Task Completion: Enforces sidecar policies and validates exit criteria.
Dual State Management: Artifact vs. Evidence
To avoid flooding the model with raw execution logs, HoH splits state tracking into two explicit channels:
Artifact State (A_t): The authoritative, version-controlled repository of generated assets (source code, configuration manifests, system schemas).
Evidence State (E_t): Verifiable metrics and evaluation data generated during testing (test output, pass/fail matrices, coverage metrics, performance benchmarks).
The Progressive Disclosure Pattern
Instead of sending raw log output back into the primary agent prompt window, raw execution logs are offloaded directly to disk. An Evidence Parser Engine extracts key stack traces and failure signatures, generating a compact Error Delta.
Only this succinct summary is passed back to the Project Planner, ensuring context windows remain focused on task execution rather than debug noise.
