AMAP-ML/LongHorizon-Harness

The long-horizon computer-use harness. Run AI agents across desktop apps and the CLI for extended periods while preserving task state and making reliable progress on complex workflows. Features fresh-context execution, durable verified state, independent auditing, recoverable progress, and native Claude Code / Codex / OpenClaw integration.

What it solves

LongHorizon-Harness addresses the problem of AI agents failing on complex, long-running tasks that require multiple steps, cross-application workflows (GUI and CLI), and reliable verification. Instead of relying on a single prompt or a single model's internal loop, it provides a durable execution framework that prevents agents from getting lost or hallucinating progress over dozens of hours of work.

How it works

The project implements "Loop Engineering," which wraps existing agent backends (like Claude Code, Codex, OpenCode, or DeepSeek Harness) in a structured cycle of planning, acting, and verifying. It divides responsibilities into three distinct roles:

  • Manager: Rebuilds the current state from the original goal and verified progress to plan the next bounded step.
  • Executor: Performs the specific action in a desktop app or terminal with a fresh context to avoid context window bloat.
  • Auditor: Independently verifies the actual results (files, logs, UI) to ensure the Executor's claims are true before progress is checkpointed.

Only verified results are saved as trusted state; failures are recorded as evidence to inform the next round of planning.

Who it’s for

Developers and power users who want to turn existing AI agents into autonomous systems capable of handling complex computer-use tasks across both the terminal and desktop applications.

Highlights

  • Cross-Surface Capability: Operates seamlessly across GUI apps (browsers, spreadsheets, design tools) and the CLI (coding, system configuration).
  • Backend Agnostic: Supports multiple agent backends including Claude Code, Codex, OpenCode, and DeepSeek Harness.
  • Role-Based Architecture: Separates planning, execution, and verification to increase reliability and reduce errors.
  • Web Workbench: Includes a React/FastAPI dashboard for starting tasks, managing roles, and interacting with runs in real-time.
  • Proven Gains: Demonstrates significant performance improvements on benchmarks like WeaveBench and OSWorld 2.0 compared to standalone agents.

Related

  • Project
  • Project
  • Dispatch
  • Project
  • Project