by AMAP-ML
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.
# Add to your Claude Code skills
git clone https://github.com/AMAP-ML/LongHorizon-HarnessGuides for using ai agents skills like LongHorizon-Harness.
Last scanned: 8/5/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-08-05T06:27:27.363Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}LongHorizon-Harness is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by AMAP-ML. 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. It has 825 GitHub stars.
Yes. LongHorizon-Harness passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/AMAP-ML/LongHorizon-Harness" and add it to your Claude Code skills directory (see the Installation section above).
LongHorizon-Harness is primarily written in Python. It is open-source under AMAP-ML on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh LongHorizon-Harness against similar tools.
No comments yet. Be the first to share your thoughts!
Give Claude Code, Codex, OpenCode, or DeepSeek Harness a goal once. Keep it working across desktop apps and the terminal for dozens of hours.
Plan → act → verify → checkpoint or recover → repeat — until the work is actually done.
Usage · The Loop · Computer Use · Results · Project Website · 简体中文
The model determines what an agent can do in one round. LongHorizon-Harness engineers the loop around it: what to do next, how to verify the result in the real computer, what progress to preserve, and how to continue after failure or context refresh.
A Loop Engineering system for Claude Code, Codex, OpenCode, and DeepSeek Harness. One-command install, ready to run.
LongHorizon-Harness turns existing agents into long-running computer-use systems. Across desktop apps and the terminal CLI, it continuously recovers the goal and verified state, selects the next bounded step, executes it with a fresh context, checks the actual result, and then checkpoints accepted progress or feeds failure evidence into the next round. It does not train a new model or replace an existing agent; it provides the durable execution loop around one.
opencode run prompt as --agent opencode, with role-scoped read/write permissions, OpenCode API endpoint overrides, normalized JSON results, and CLI/config/doctor integration. The Web workbench can select OpenCode Harness and its model independently for each role.dsh --profile headless as --agent deepseek_harness, with an isolated DSH_HOME, role-scoped read/write permissions, DeepSeek API endpoint overrides, normalized JSONL results, and CLI/config/doctor integration. The Web workbench can select DeepSeek Harness and its model independently for each role. GUI computer-use and MCP support will follow in a later phase; see the CLI setup.lh-harness web; see Run a task in the browser.doctor diagnostics. See Manage computer-use plugins.🚀 We’re iterating rapidly. Stay tuned!
https://github.com/user-attachments/assets/ca8b77ce-9220-4d85-a272-b346009b2454
Give LongHorizon-Harness an outcome. It repeatedly turns the remaining work into a bounded step, performs that step on the right computer surface, checks what actually happened, and carries the verified result into the next round.
flowchart LR
S["Original goal +<br/>verified state"] --> P["Plan the next<br/>bounded step"]
P --> A["Act in a desktop app or CLI<br/>with fresh context"]
A --> V["Verify files, UI, logs, and tests<br/>in the real environment"]
V -->|Pass| C["Checkpoint<br/>verified progress"]
V -->|Fail| R["Record evidence<br/>and recover"]
C --> D{"Task complete?"}
R --> S
D -->|No| S
D -->|Yes| F["Verified result"]
This is Loop Engineering: designing the execution, verification, correction, and recovery loop around the agent — not just the prompt for a single turn.
The roles are implementation boundaries inside the loop, not three agents independently growing their own versions of the task.
| Loop responsibility | Role | What it owns |
|---|---|---|
| 🧭 State and next step | Manager | Rebuilds each round from the original goal, verified progress, failure evidence, and remaining work |
| ⚡ Action | Executor | Starts with a fresh context and completes one clearly defined step in a desktop app or the CLI |
| 🔍 Ground truth | Auditor | Independently inspects the actual files, interfaces, logs, and tests instead of trusting the Executor's claim |
Only results that pass independent verification become trusted task state. A rejected result remains evidence, not progress. When a context is refreshed, an action fails, or a deliverable does not pass inspection, the next round starts from the original goal and the last verified checkpoint, then continues from what remains.
LongHorizon-Harness supports both GUI and CLI workflows.
| 🖥️ Operate the desktop | ⌨️ Work in the terminal |
|---|---|
| 🌐 Click, type, scroll, and browse | 💻 Write and modify code |
| 📊 Operate spreadsheets | ▶️ Run commands and scripts |
| 📄 Edit documents | 📦 Install dependencies and environments |
| 🎨 Use design software | 🔧 Configure and debug systems |
| 🧊 Operate 3D tools | 📁 Process files and data |
One task can begin in a browser, move to the command line for data processing, continue in desktop software to produce an artifact, and return to the terminal for validation or debugging. The goal, progress, and evidence remain under the same state-management system throughout.
LongHorizon-Harness is not tied to a specific model or agent backend. Existing models and agents connect through configuration without changing their original workflows.
| Layer | Supported choices | |
|---|---|---|
| 🧠 | Models | Claude, GPT, Qwen, and other models exposed by an agent backend |
| 🤖 | Agent backends | Claude Code, Codex CLI, OpenCode, DeepSeek Harness (dsh, CLI-only in phase 1), and custom AgentAdapter implementations |
| 🎛️ | Role assignment | The Manager, Executor, and Auditor can each use a different model or backend |
| 🖥️ | Execution environments | Local, with a pluggable Environment protocol |
A lightweight AgentAdapter preserves each agent's native execution loop while LongHorizon-Harness coordinates role boundaries, verified task state, and cross-round progress around it.
Use one model for all three roles, or combine different models and backends to balance quality, speed, and cost.
LongHorizon-Harness is not demonstrated only on a handful of carefully selected success cases.
We ran it on hundreds of complex tasks across GUI, CLI, and mixed computer environments:
| Task domain | What the tasks involve |
|---|---|
| 🌐 Web Frontend | Developing, fixing, and validating websites and web applications through browser interaction, developer tools, and code changes |
| 📊 Data Analysis & Visualization | Processing data, producing charts and dashboards, and checking analytical results and visual deliverables |
| 🛠️ Operations & Debugging | Investigating logs, networks, performance, and service failures; configuring, diagnosing, and repairing systems |
| 🎨 Design & Image Processing | Editing visual assets, matching design references, processing images, and verifying final visual quality |
| 🎮 Games & Interaction | Building, operating, and debugging games or interactive applications; checking interaction logic and runtime behavior |
| 📄 Documents & Presentations | Editing do |