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.
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 88 GitHub stars.
LongHorizon-Harness's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
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!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Operate the whole computer like a human. Work across desktop apps and the command line for dozens of hours.
No state drift. Verifiable progress. Complex tasks carried through to completion.
Usage · What You Get · How It Works · Results · Project Website · 简体中文
The model determines what an agent can do in one round. LongHorizon-Harness determines whether that work can be verified, preserved, and continued until the task is actually complete.
Works with Claude Code, Codex, and OpenClaw. One-command install, ready to run.
LongHorizon-Harness is an execution, state-management, and result-verification system for long-horizon tasks. It does not train a new model or replace an existing agent. It runs on top of systems such as Codex and Claude Code, helping agents operate autonomously in real computer environments for extended periods and continuously move complex tasks forward.
https://github.com/user-attachments/assets/ca8b77ce-9220-4d85-a272-b346009b2454
LongHorizon-Harness separates planning, execution, and verification so that one growing context is not responsible for everything.
| Role | One responsibility | |
|---|---|---|
| 🧭 | Manager | Maintains the original goal, verified progress, and next step |
| ⚡ | Executor | Starts each round with a fresh context and focuses on one clearly defined task |
| 🔍 | Auditor | Independently inspects files, interfaces, logs, and tests in the real environment |
Only results that pass independent verification enter persistent task state. Even when the context is refreshed, an action fails, or a deliverable does not pass inspection, the system retains previously verified progress and 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.
GUI interaction is supplied through a compatible external computer-use MCP server. LongHorizon-Harness does not bundle or enable a specific computer-use implementation by default.
lh-harness run --task @task.md --agent claude_code \
--mcp-config /path/to/your/mcp.json \
--mcp-add-dir /path/to/your/mcp/files
You can also use LH_HARNESS_CLAUDECODE_MCP_CONFIG and LH_HARNESS_CLAUDECODE_ADD_DIRS. When no configuration is supplied, the Claude Code adapter does not add MCP arguments.
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, OpenClaw, and custom AgentAdapter implementations |
| 🎛️ | Role assignment | The Manager, Executor, and Auditor can each use a different model or backend |
| 🖥️ | Execution environments | Local, ssh://user@host:port, and docker://container |
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 documents and slide decks, including content, formatting, references, layout, and final delivery |
| 🧊 Spatial Reasoning | Completing tasks involving spatial relationships, geometry, precise placement, and 3D operations |
| 🖥️ Desktop & System Settings | Operating desktop applications, files, and system settings across multi-application workflows |
| 🔬 Research & Education | Completing literature research, coursework, teaching materials, forms, and research-support workflows |
| 🎬 Creative Production | Producing presentations, video, audio, and other media while coordinating assets across tools |
| ⚙️ Engineering & Computing | Using CAD, EDA, scientific software, development tools, and cloud or DevOps toolchains |
| 🎫 Personal Services | Handling event ticketing, everyday services, games, and visual-search workflows |
| 🏛️ Administration & Compliance | Completing office, legal, policy-sensitive form, institutional, and safety-aware submission workflows |
| 💼 Business & Finance | Handling market analysis, procurement, loans, sales, reimbursements, and cross-application enterprise workflows |
| 🏥 Healthcare | Completing medical quality-control, insurance, immunization, and structured health-form workflows |
| Benchmark | Metric | Claude Code | LongHorizon-Harness | Gain |
|---|---|---|---|---|
| WeaveBench (114 tasks) | PassRate | 51.8 | 80.7 | +28.9 |
| WeaveBench | Overall | 0.702 | 0.835 | +0.133 |
| OSWorld 2.0 (108 tasks) | Binary | 2.8 | 8.3 | 3.0× |
| OSWorld 2.0 | Partial | 21.5 | 35.2 | +13.7 |
| Terminal-Bench 2.1 | Success rate | 69.7 | 77.2 | +7.5 |
All rows use Qwen 3.7-Plus as the backbone and Claude Code as the execution backend.
Full result tables and case trajectories are available on the LongHorizon-Harness project website.
Install LongHorizon-Harness:
uv tool install lh-harness
LongHorizon-Harness requires Python 3.10+ and at least one agent runtime: claude, codex, or openclaw.
Run a task:
lh-harness run \
--task "Inspect the