# LongHorizon-Harness: The Loop Engineering That Lets Agents Run for Hours, Not Minutes

> Source: <https://dev.to/sun_young_517829fc09d0c05/longhorizon-harness-the-loop-engineering-that-lets-agents-run-for-hours-not-minutes-4j91>
> Published: 2026-09-08 16:41:56+00:00

Every agent user hits the same wall: **it can't go the distance.**

Give an agent a complex, multi-app task, and somewhere along the way it loses the plot — the context window fills up and it forgets its progress, or one step fails and the whole task restarts from zero, or it claims "done" and you have no way to verify. The problem isn't a lack of smarts. It's a missing layer of **loop engineering**: how an agent sustains state, verifies results, and recovers from failure over hours, not minutes.

[LongHorizon-Harness](https://github.com/AMAP-ML/LongHorizon-Harness) (1.5k stars, MIT) is built for exactly this — and it comes with an arXiv paper (2608.01964), which already tells you it's not another toy.

**Plan → act → verify → checkpoint or recover → repeat**, until the work is actually done.

Four mechanisms do the heavy lifting:

The README is refreshingly honest about what it is and isn't: **it doesn't train new models or replace your agent — it wraps your agent in a persistent execution loop.** Your Claude Code, Codex, OpenCode, or DeepSeek Harness stays itself, just with a shell that lets it run long and recover from failure.

It improves *persistence*, not *capability*. If your agent can't operate a piece of software to begin with, the harness won't make it suddenly able to. What it gives you is stability over long horizons and recovery from failure — not more intelligence. It's also early (v0.1.x) and aimed at developers willing to run long tasks, not casual users.

I've localized the README and core docs to Chinese: [https://github.com/yangshun2005/LongHorizon-Harness-cn](https://github.com/yangshun2005/LongHorizon-Harness-cn)

If you find this project useful, a star on the original repo supports the author's ongoing maintenance.
