{"slug": "longhorizon-harness-advancing-long-horizon-agents-for-real-world-tasks", "title": "LongHorizon-Harness: Advancing Long-Horizon Agents for Real-World Tasks", "summary": "LongHorizon-Harness, an open-source loop engineering system for AI agents, reached #1 on the Hugging Face Daily Papers weekly ranking for 2026-W32 and released v0.1.6 on 2026-08-15, adding OpenCode CLI support. The system, which works with Claude Code, Codex, OpenCode, and DeepSeek Harness, enables agents to autonomously complete real-world tasks across desktop apps and terminal CLIs over dozens of hours by planning, acting, verifying, checkpointing, and recovering in a continuous loop. It does not train new models but provides a durable execution loop around existing agents, with a browser-based dashboard and support for multiple backends.", "body_md": "**Give Claude Code, Codex, OpenCode, or DeepSeek Harness a goal once. Keep it working across desktop apps and the terminal for dozens of hours.**\n\n**Plan → act → verify → checkpoint or recover → repeat — until the work is actually done.**\n\n[Usage](#one-command-full-visibility) · [The Loop](#loop-engineering-for-real-computer-environments) · [Computer Use](#desktop-apps-and-cli-one-continuous-task) · [Results](#hundreds-of-real-tasks-measured-gains) · [Project Website](https://lh-harness.pages.dev) · [简体中文](/AMAP-ML/LongHorizon-Harness/blob/main/README.zh-CN.md)\n\nThe 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.\n\n**A Loop Engineering system for Claude Code, Codex, OpenCode, and DeepSeek Harness. One-command install, ready to run.**\n\nLongHorizon-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.\n\n**[v0.1.6 · 2026-08-15]** Added[OpenCode](https://github.com/anomalyco/opencode)CLI support. LongHorizon-Harness can now run`opencode run prompt`\n\nas`--agent opencode`\n\n, 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.**[v0.1.5 · 2026-08-14]** Added phase-1[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)CLI support. LongHorizon-Harness can now run`dsh --profile headless`\n\nas`--agent deepseek_harness`\n\n, with an isolated`DSH_HOME`\n\n, 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](#5-or-run-a-task-from-the-command-line).**[v0.1.4 · 2026-08-11]** The new Dashboard has landed: a React/FastAPI workbench you can drive entirely from the browser. Start a task, choose a backend and model per role, answer approvals, send an instruction mid-run, and stop or restart a run. Launch it with`lh-harness web`\n\n; see[Run a task in the browser](#4-run-a-task-in-the-browser-recommended).**[2026-08-10]** Added the Terminal-Bench 2.1 evaluation.**[v0.1.3 · 2026-08-07]** Every run now ends with a plain-language reply that answers your task from the verified state alone. Tasks act on the directory you launched from by default, and the console reports each round as it happens.**[2026-08-06]** LongHorizon-Harness reaches**#1** on the[Hugging Face Daily Papers weekly ranking](https://huggingface.co/papers/week/2026-W32).**[v0.1.2 · 2026-08-06]** Adds unified computer-use plugin management, stronger auditor read-only checks and role isolation, reliable process cleanup, and expanded`doctor`\n\ndiagnostics. See[Manage computer-use plugins](#manage-computer-use-plugins).\n\n🚀 We’re iterating rapidly. Stay tuned!\n\n## promotional_video_1440p.mp4\n\n**Open the promotional video (1440p MP4)**\n\nGive 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.\n\n``` php\nflowchart LR\n    S[\"Original goal +<br/>verified state\"] --> P[\"Plan the next<br/>bounded step\"]\n    P --> A[\"Act in a desktop app or CLI<br/>with fresh context\"]\n    A --> V[\"Verify files, UI, logs, and tests<br/>in the real environment\"]\n    V -->|Pass| C[\"Checkpoint<br/>verified progress\"]\n    V -->|Fail| R[\"Record evidence<br/>and recover\"]\n    C --> D{\"Task complete?\"}\n    R --> S\n    D -->|No| S\n    D -->|Yes| F[\"Verified result\"]\n```\n\nThis is **Loop Engineering**: designing the execution, verification, correction, and recovery loop around the agent — not just the prompt for a single turn.\n\nThe roles are implementation boundaries inside the loop, not three agents independently growing their own versions of the task.\n\n| Loop responsibility | Role | What it owns |\n|---|---|---|\n🧭 State and next step |\nManager |\nRebuilds each round from the original goal, verified progress, failure evidence, and remaining work |\n⚡ Action |\nExecutor |\nStarts with a fresh context and completes one clearly defined step in a desktop app or the CLI |\n🔍 Ground truth |\nAuditor |\nIndependently inspects the actual files, interfaces, logs, and tests instead of trusting the Executor's claim |\n\nOnly 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.\n\nLongHorizon-Harness supports both GUI and CLI workflows.\n\n| 🖥️ Operate the desktop | ⌨️ Work in the terminal |\n|---|---|\n| 🌐 Click, type, scroll, and browse | 💻 Write and modify code |\n| 📊 Operate spreadsheets | |\n| 📄 Edit documents | 📦 Install dependencies and environments |\n| 🎨 Use design software | 🔧 Configure and debug systems |\n| 🧊 Operate 3D tools | 📁 Process files and data |\n\nOne 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.\n\nLongHorizon-Harness is not tied to a specific model or agent backend. Existing models and agents connect through configuration without changing their original workflows.\n\n| Layer | Supported choices | |\n|---|---|---|\n| 🧠 | Models |\nClaude, GPT, Qwen, and other models exposed by an agent backend |\n| 🤖 | Agent backends |\nClaude Code, Codex CLI, OpenCode, DeepSeek Harness (`dsh` , CLI-only in phase 1), and custom `AgentAdapter` implementations |\n| 🎛️ | Role assignment |\nThe Manager, Executor, and Auditor can each use a different model or backend |\n| 🖥️ | Execution environments |\nLocal, with a pluggable `Environment` protocol |\n\nA lightweight `AgentAdapter`\n\npreserves each agent's native execution loop while LongHorizon-Harness coordinates role boundaries, verified task state, and cross-round progress around it.\n\nUse one model for all three roles, or combine different models and backends to balance quality, speed, and cost.\n\nLongHorizon-Harness is not demonstrated only on a handful of carefully selected success cases.\n\nWe ran it on hundreds of complex tasks across GUI, CLI, and mixed computer environments:\n\n| Task domain | What the tasks involve |\n|---|---|\n🌐 Web Frontend |\nDeveloping, fixing, and validating websites and web applications through browser interaction, developer tools, and code changes |\n📊 Data Analysis & Visualization |\nProcessing data, producing charts and dashboards, and checking analytical results and visual deliverables |\n🛠️ Operations & Debugging |\nInvestigating logs, networks, performance, and service failures; configuring, diagnosing, and repairing systems |\n🎨 Design & Image Processing |\nEditing visual assets, matching design references, processing images, and verifying final visual quality |\n🎮 Games & Interaction |\nBuilding, operating, and debugging games or interactive applications; checking interaction logic and runtime behavior |\n📄 Documents & Presentations |\nEditing documents and slide decks, including content, formatting, references, layout, and final delivery |\n🧊 Spatial Reasoning |\nCompleting tasks involving spatial relationships, geometry, precise placement, and 3D operations |\n🖥️ Desktop & System Settings |\nOperating desktop applications, files, and system settings across multi-application workflows |\n🔬 Research & Education |\nCompleting literature research, coursework, teaching materials, forms, and research-support workflows |\n🎬 Creative Production |\nProducing presentations, video, audio, and other media while coordinating assets across tools |\n⚙️ Engineering & Computing |\nUsing CAD, EDA, scientific software, development tools, and cloud or DevOps toolchains |\n🎫 Personal Services |\nHandling event ticketing, everyday services, games, and visual-search workflows |\n🏛️ Administration & Compliance |\nCompleting office, legal, policy-sensitive form, institutional, and safety-aware submission workflows |\n💼 Business & Finance |\nHandling market analysis, procurement, loans, sales, reimbursements, and cross-application enterprise workflows |\n🏥 Healthcare |\nCompleting medical quality-control, insurance, immunization, and structured health-form workflows |\n\nGUI + CLI completionWeaveBench\n|\nFull desktop-task completionOSWorld 2.0\n|\nCode + CLI successTerminal-Bench 2.1 · 24% fewer tokens\n|\n\n| Benchmark | Metric | Claude Code | LongHorizon-Harness |\nGain |\n|---|---|---|---|---|\nWeaveBench (114 tasks) |\nPassRate | 51.8 | 80.7 |\n+28.9 |\nWeaveBench |\nOverall | 0.702 | 0.835 |\n+0.133 |\nOSWorld 2.0 (108 tasks) |\nBinary | 2.8 | 8.3 |\n3.0× |\nOSWorld 2.0 |\nPartial | 21.5 | 35.2 |\n+13.7 |\nTerminal-Bench 2.1 |\nSuccess rate | 69.7 | 77.2 |\n+7.5 |\n\nAll rows use Qwen 3.7-Plus as the backbone and Claude Code as the execution backend.\n\nFull result tables and case trajectories are available on the [LongHorizon-Harness project website](https://lh-harness.pages.dev).\n\nSteps 1–2 are once per machine; step 3 is once per project. Then run tasks from the browser (step 4) or the command line (step 5).\n\n| Needed for | |\n|---|---|\n|\n\n`uv tool install`\n\nbrings its own; a pip install uses yours.`PATH`\n\n: [,](https://github.com/openai/codex#installing-and-running-codex-cli)`codex`\n\n[,](https://docs.anthropic.com/en/docs/claude-code/getting-started)`claude`\n\n[, or](https://github.com/anomalyco/opencode)`opencode`\n\n`dsh`\n\n[Node.js](https://nodejs.org)20 or later`^22.19.0`\n\nor `>=24.0.0`\n\n.\n\nPlatform status:Currently tested on macOS. Windows support is included but has not yet been thoroughly tested.\n\nRun `lh-harness doctor`\n\nat any point to check all of the above; see [Verify the environment](#verify-the-environment).\n\n```\nuv tool install lh-harness            # or: pip install lh-harness\n```\n\nUpgrade later with `uv tool upgrade lh-harness`\n\nor `pip install --upgrade lh-harness`\n\n.\n\nSkip this if your tasks never touch the GUI. Otherwise install the one that matches your agent. No plugin is enabled by default, and one install covers every project on the machine.\n\nUsing Codex:\n\n```\nlh-harness plugin install codex-computer-use\n```\n\nUsing Claude Code, or both agents:\n\n```\nlh-harness plugin install open-computer-use\n```\n\n`codex-computer-use`\n\nis the official plugin bundled with the Codex CLI and only works with Codex. `open-computer-use`\n\nis distributed on npm, needs Node.js 20+, and drives both agents. Both need OS permissions that **must be granted by hand on macOS**. See [Manage computer-use plugins](#manage-computer-use-plugins) for that, for `clawdcursor`\n\nas a third option, and for how each one is wired.\n\n```\ncd /path/to/your/project\nlh-harness init\n```\n\nThis creates `./.lh-harness/config.toml`\n\nwithout replacing an existing file; use `lh-harness init --force`\n\nto regenerate. Open it and adjust the defaults. Every field is documented in [Configuration reference](#configuration-reference).\n\n```\nlh-harness web --workspace-root .\n```\n\nThis opens the workbench at `http://127.0.0.1:8799/`\n\n. Everything happens there: start a task, pick a backend and model per role, answer approval requests, send an instruction mid-run, and stop or restart a run. `--workspace-root`\n\nsets the default working directory for tasks created there; the remaining options are listed under [Dashboard commands](#dashboard-commands).\n\n```\nTASK=\"Inspect the current directory and summarize its files.\"\nlh-harness run --task \"${TASK}\" --agent codex\n```\n\nExplicit CLI arguments such as `--agent`\n\noverride the matching values in `./.lh-harness/config.toml`\n\nfor that run; drop them to use the configured defaults.\n\nTo use the phase-1 DeepSeek Harness CLI backend, install its official npm package, provide a DeepSeek API key, and select `deepseek_harness`\n\n:\n\n```\nnpm install -g @deepseek-ai/dsh\n# If your npm mirror has not synced the package:\n# npm install -g @deepseek-ai/dsh --registry=https://registry.npmjs.org\n\ndsh --version\nexport DEEPSEEK_API_KEY=\"sk-...\"\n# Optional for a private or compatible endpoint:\n# export DEEPSEEK_BASE_URL=\"https://your-endpoint.example.com\"\n\nlh-harness doctor\nlh-harness run --task @task.md --agent deepseek_harness \\\n  --model deepseek-v4-flash --no-dashboard\n```\n\nTo make DeepSeek Harness the project default, put this in `./.lh-harness/config.toml`\n\n:\n\n```\n[run]\nagent = \"deepseek_harness\"\nmodel = \"deepseek-v4-flash\"\ndashboard = false\n```\n\nThen use LongHorizon-Harness as usual:\n\n```\nlh-harness run --task @task.md\n```\n\nThe LongHorizon Web workbench also exposes **DeepSeek Harness (CLI)** in each role's Harness selector and offers `deepseek-v4-flash`\n\nplus a custom model ID. Export the provider environment variables before starting the Web server so its worker processes inherit them:\n\n```\nexport DEEPSEEK_API_KEY=\"sk-...\"\n# export DEEPSEEK_BASE_URL=\"https://your-endpoint.example.com\"\nlh-harness web --workspace-root .\n```\n\nThe adapter runs `dsh --profile headless`\n\n, gives every run an isolated `DSH_HOME`\n\n, uses `workspace-write`\n\nfor executors, and uses `read-only`\n\nfor the Manager and auditors. `--api-key`\n\nmaps to `DEEPSEEK_API_KEY`\n\n, `--base-url`\n\nmaps to `DEEPSEEK_BASE_URL`\n\n, and `LH_HARNESS_DSH_BINARY`\n\ncan select a non-`PATH`\n\nbinary. DeepSeek Harness is still a developer preview; this phase intentionally does not expose its Web UI, computer-use plugins, MCP config, or `--mcp-add-dir`\n\n. Its headless profile currently returns only the final answer, so intermediate DeepSeek tool events are not streamed into the trajectory; the upstream positional task interface also means the task text is visible in the child process argument list while an episode is running.\n\nThe agents work in the directory you launched from, so the task acts on your real project. Set `workspace`\n\nor `--workspace`\n\nto point somewhere else. `./.lh-harness/`\n\nitself stays off limits, so the run's own logs and state are never mistaken for task content.\n\nThe Dashboard opens in your browser automatically, and the console prints one line per role as the run progresses. At the end you get a plain-language reply that answers your request from the verified state alone, and says so plainly if the task did not finish.\n\nEvery run is stored under `./.lh-harness/runs/<run-id>/`\n\n; the full report, including that reply, stays in the run's `logs/report.json`\n\n.\n\n```\nlh-harness doctor\n```\n\n`doctor`\n\nis read-only. It reports the Python runtime, the agent CLIs, Node.js, and plugin state, and exits non-zero when a required check fails.\n\nAgent CLIs are verified by running `<binary> --version`\n\n, not just by finding them on `PATH`\n\n, so one that is present but broken is reported as a failure instead of OK. This catches the Windows case where a Microsoft Store desktop install leaves a zero-byte `codex.exe`\n\nalias on `PATH`\n\nthat is not the CLI; `doctor`\n\nprints how to fix it.\n\nIt also checks [PyPI](https://pypi.org/project/lh-harness) for a newer version. To check on its own:\n\n```\nlh-harness check-update\n```\n\n`lh-harness run`\n\nreads `./.lh-harness/config.toml`\n\nautomatically. Precedence is:\n\n- Explicit CLI arguments\n- Values in\n`./.lh-harness/config.toml`\n\n- Built-in defaults\n\nTask text, run IDs, and API keys are deliberately **not** configurable here; they stay command-line or environment inputs so they never land in a file you might commit.\n\n| Field | Default | Description |\n|---|---|---|\n`agent` |\n`\"codex\"` |\nBackend for every role unless a role overrides it: `codex` , `claude_code` , `opencode` , or `deepseek_harness` . |\n`model` |\n`\"gpt-5.6-sol\"` |\nModel for every role unless a role overrides it. Must be a model the chosen backend exposes. |\n`env` |\n`\"local\"` |\nExecution environment. Only `local` today. |\n`runs_root` |\n`\"./.lh-harness/runs\"` |\nWhere run directories are created. Each run gets `<runs_root>/<run-id>/` . |\n`workspace` |\ncommented out | Working directory the agents operate in. Defaults to the directory `lh-harness` was started from, so a task acts on your real project; set it to isolate the run somewhere else. |\n`harness_dir` |\ncommented out | Where harness task state is written. Defaults to the run's own `harness/` , keeping it out of the workspace. |\n`log_dir` |\ncommented out | Where logs are written. Defaults to the run's own `logs/` . |\n`base_url` |\ncommented out | OpenAI-compatible endpoint override, for a proxy or a self-hosted model. |\n`prompt_language` |\n`\"en\"` |\nLanguage of the harness-generated prompts and reports: `en` or `zh` . Does not restrict the task language. |\n`claude_mcp_config` |\ncommented out | Path to a `.mcp.json` for Claude Code. Overrides the installed plugin. |\n`codex_mcp_config` |\ncommented out | Path to a `[mcp_servers.*]` TOML for Codex. Overrides the installed plugin. |\n`mcp_add_dirs` |\n`[]` |\nExtra directories the MCP server may read. Claude Code rejects these, because its role isolation requires task files to live inside the workspace. |\n`max_rounds` |\n`30` |\nUpper bound on Manage-Execute-Audit rounds before the run stops. |\n`dashboard` |\n`true` |\nStart the web dashboard with each run. |\n`dashboard_port` |\n`0` |\nDashboard port; `0` lets the OS pick a free one. |\n\nPer-episode limits in seconds. One episode is a single role invocation, not the whole run.\n\n| Field | Default | Description |\n|---|---|---|\n`manager` |\n`600` |\nPlanning the next step. |\n`gui_executor` |\n`1800` |\nExecuting a GUI/visual subtask. |\n`cli_executor` |\n`1800` |\nExecuting a CLI/non-GUI subtask. |\n`auditor` |\n`600` |\nVerifying a subtask. Applies to both auditors. |\n\nEach role can take its own `agent`\n\nand `model`\n\n, so you can pay for a strong model only where it matters: a capable Manager and Auditor with a cheaper Executor, for example. Every field is commented out by default, meaning \"inherit\".\n\nResolution walks the chain until it finds a value:\n\n```\ngui_executor → executor → [run].agent / [run].model\ncli_auditor  → auditor  → [run].agent / [run].model\n```\n\n| Section | Falls back to | Covers |\n|---|---|---|\n`[run.roles.manager]` |\n`[run]` |\nThe scheduler role |\n`[run.roles.executor]` |\n`[run]` |\nBoth executor roles |\n`[run.roles.gui_executor]` |\n`executor` |\nGUI/visual subtasks |\n`[run.roles.cli_executor]` |\n`executor` |\nCLI/non-GUI subtasks |\n`[run.roles.auditor]` |\n`[run]` |\nBoth auditor roles |\n`[run.roles.gui_auditor]` |\n`auditor` |\nGUI audit |\n`[run.roles.cli_auditor]` |\n`auditor` |\nCLI audit |\n`[run.roles.final_response]` |\n`manager` |\nThe closing reply written for you |\n\nEvery field above also has a CLI flag (`--agent`\n\n, `--max-rounds`\n\n, `--gui-executor-model`\n\n, `--auditor-timeout`\n\n, and so on) that overrides it for a single run. Run `lh-harness run --help`\n\nfor the full list.\n\nIf a Manager, Executor, or Auditor reaches its local episode timeout, the run keeps the partial trajectory and recorded task state, then lets the next Manager round inspect the real workspace and recover. The timeout remains an agent execution timeout; it is not treated as proof of a provider network failure. Repeated timed-out rounds still trigger the Dashboard's human-review gate.\n\nComputer-use setup is intentionally separate from task execution: `doctor`\n\nonly reports status, and `lh-harness run`\n\nnever installs, removes, or changes plugins. All changes go through `lh-harness plugin`\n\n.\n\nList the available plugins with their install state, supported agents, and homepages:\n\n```\nlh-harness plugin list\n```\n\n| Plugin | Source | Agents | Platforms |\n|---|---|---|---|\n`codex-computer-use` |\nOfficial plugin bundled with the Codex CLI | `codex` |\nwhatever your Codex build offers |\n`open-computer-use` |\nnpm (\n|\n\n`codex`\n\n, `claude_code`\n\n`clawdcursor`\n\n[clawdcursor](https://github.com/AmrDab/clawdcursor))`codex`\n\n, `claude_code`\n\nInstalling needs no agent flag. Every agent the plugin supports is configured, since the per-agent difference is only one more config file:\n\n```\nlh-harness plugin install clawdcursor\n```\n\nOne install covers every project on the machine. It installs the package, runs whatever consent or permission step the plugin needs on the current OS, and writes one MCP config per agent under `~/.lh-harness/plugins/`\n\n. Agents missing from `PATH`\n\nare skipped; `--agent`\n\nnarrows the selection, and `--no-activate`\n\nskips the permission step on a headless machine.\n\n`lh-harness run`\n\nthen loads the right server automatically. When several are installed, the first available one wins:\n\n```\ncodex-computer-use > open-computer-use > clawdcursor\n```\n\n`--claude-mcp-config`\n\nand `--codex-mcp-config`\n\noverride that choice. `plugin list`\n\nand `doctor`\n\nboth print which plugin each agent will load and whether its permissions are granted.\n\nTo remove one:\n\n```\nlh-harness plugin uninstall clawdcursor\n```\n\n**GUI access stays scoped to the harness.** The npm plugins live entirely inside `~/.lh-harness/`\n\nand are passed per run, so `~/.codex/config.toml`\n\n, `~/.claude.json`\n\n, and the user-scope MCP registries are never touched. `codex-computer-use`\n\nis the unavoidable exception: Codex loads it from its own registry, so `codex plugin add`\n\nrecords it there.\n\n** codex-computer-use needs manual grants on macOS.** It raises no permission dialog, so an unauthorized GUI call just fails. The install opens the two panes for you; tick\n\n*Codex Computer Use*under Privacy & Security →\n\n**Accessibility** and →\n\n**Screen & System Audio Recording**, then re-run the install to verify. On Windows there is nothing to grant, but the harness has to run in a signed-in desktop session and stay unelevated.\n\nAny missing prerequisite is printed during install.\n\nAny MCP server can be passed to the agents, not just computer-use ones. Each backend reads its own native format; nothing is translated between them.\n\nClaude Code takes a `.mcp.json`\n\nfile through `--claude-mcp-config`\n\n:\n\n```\n{\n  \"mcpServers\": {\n    \"computer-use\": {\n      \"command\": \"/path/to/mcp-server\",\n      \"args\": [\"--option\", \"value\"],\n      \"env\": {\n        \"EXAMPLE_VARIABLE\": \"value\"\n      }\n    }\n  }\n}\n```\n\nCodex takes a TOML file of `[mcp_servers.<name>]`\n\ntables through `--codex-mcp-config`\n\n, matching `~/.codex/config.toml`\n\n:\n\n```\n[mcp_servers.my-server]\ncommand = \"/path/to/mcp-server\"\nargs = [\"--option\", \"value\"]\n\n[mcp_servers.my-server.env]\nEXAMPLE_VARIABLE = \"value\"\n```\n\nPass the config for the backend in use, plus any directory the server needs to read:\n\n```\nlh-harness run --task @task.md --agent codex \\\n  --codex-mcp-config /path/to/mcp.toml \\\n  --mcp-add-dir /path/to/mcp/files\n```\n\nBoth flags can be given together when roles use different backends, and `--mcp-add-dir`\n\nmay be repeated. The equivalent environment variables are `LH_HARNESS_CLAUDECODE_MCP_CONFIG`\n\n, `LH_HARNESS_CODEX_MCP_CONFIG`\n\n, and `LH_HARNESS_MCP_ADD_DIRS`\n\n, the last separated by `:`\n\non macOS/Linux and `;`\n\non Windows.\n\nPrefer letting the server read API keys from its environment over writing them into the config file.\n\n```\nlh-harness run --task @task.md --dashboard      # Monitor a live run\nlh-harness dashboard                            # Browse completed and active runs\nlh-harness web --workspace-root .               # Serve the workbench for another directory\n```\n\n`dashboard`\n\nand `web`\n\nstart the same workbench and accept the same options; `web`\n\nreads as the plain service entry point when the workbench is what you want, not a side effect of a run.\n\n| Option | Description |\n|---|---|\n`--workspace-root` |\nDefault workspace for runs created from the workbench (default: current directory) |\n`--runs-root` |\nBase directory holding runs (default: `./.lh-harness/runs` ) |\n`--log-dir` |\nPin one run's log directory instead of browsing `--runs-root` |\n`--host` / `--port` |\nBind address (default: `127.0.0.1:8799` ); `--port 0` lets the OS pick |\n`--auth-token` |\nBearer token, required for any non-loopback `--host` (also `LH_HARNESS_WEB_TOKEN` ) |\n`--no-open` |\nDo not open the URL in a browser |\n\n| Option | Description |\n|---|---|\n`--task` |\nTask text or `@task.md` |\n`--agent` |\n`claude_code` , `codex` , `opencode` , or `deepseek_harness` (CLI-only in phase 1) |\n`--env` |\n`local` |\n`--max-rounds` |\nMaximum number of Manage-Execute-Audit rounds; the CLI default is 30 |\n`--dashboard` |\nStart live monitoring and human intervention |\n`--no-dashboard` |\nDisable a Dashboard enabled by the project configuration |\n\nRun a longer task from a file and open the Dashboard:\n\n```\nlh-harness run --task @task.md --dashboard\n```\n\nThe Dashboard shows every round's plan, execution result, audit evidence, and reason for rework. It also provides human gates when a task completes, becomes blocked, needs input, or fails repeatedly.\n\n| 📋 Plan | ⚡ Execution | 🔍 Audit | ♻️ Rework |\n|---|---|---|---|\n| What happens next | What the agent did | What the environment proves | Why another round is needed |\n\nEvery run is stored in an isolated `runs/<run-id>/`\n\ndirectory. The complete task state and audit trail make the agent's progress inspectable, recoverable, and reproducible.\n\n| Run record | What it preserves |\n|---|---|\n📋 Task state |\nOriginal goal, requirements, verified progress, and remaining work |\n🧾 Event stream |\nWhat happened throughout the run |\n🔍 Audit reports |\nEvidence and acceptance decisions for every round |\n🧠 Role trajectories |\nManager, Executor, and Auditor inputs and outputs |\n📁 Workspace |\nFiles and artifacts produced during execution |\n✅ Final report |\nThe verified outcome of the task |\n\n`eval/`\n\nprovides frozen reproduction suites for three benchmarks:\n\n| Directory | Benchmark | Description |\n|---|---|---|\n`eval/WeaveBench-harness/` |\n\n`eval/OSWorldv2-harness/`\n\n`eval/TB-harness/`\n\nSee each directory's `README.md`\n\nor `README.zh-CN.md`\n\nfor environment setup, parameters, and launch commands. The nested `Harness`\n\n/ `cua_harness`\n\ncode is a frozen compatibility copy used for evaluation; new integrations should use `src/lh_harness/`\n\n.\n\n```\n@article{longhorizonharness2026,\n  title={LongHorizon-Harness: Advancing Long-Horizon Agents for Real-World Tasks},\n  author={Ziyu Ma and Hailang Huang and Shun Zou and Yong Wang and Shidong Yang and Yiming Hu and Fei Wei and XiangXiang Chu},\n  journal={arXiv preprint arXiv:2608.01964},\n  year   = {2026},\n  url    = {https://arxiv.org/abs/2608.01964}\n}\n```\n\n**Operate the whole computer. Preserve verified progress. Keep working until the task is done.**", "url": "https://wpnews.pro/news/longhorizon-harness-advancing-long-horizon-agents-for-real-world-tasks", "canonical_source": "https://github.com/AMAP-ML/LongHorizon-Harness", "published_at": "2026-08-17 23:51:43+00:00", "updated_at": "2026-08-18 00:10:55.302326+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "ai-infrastructure", "developer-tools"], "entities": ["LongHorizon-Harness", "Hugging Face", "Claude Code", "Codex", "OpenCode", "DeepSeek Harness", "AnomalyCo", "DeepSeek AI"], "alternates": {"html": "https://wpnews.pro/news/longhorizon-harness-advancing-long-horizon-agents-for-real-world-tasks", "markdown": "https://wpnews.pro/news/longhorizon-harness-advancing-long-horizon-agents-for-real-world-tasks.md", "text": "https://wpnews.pro/news/longhorizon-harness-advancing-long-horizon-agents-for-real-world-tasks.txt", "jsonld": "https://wpnews.pro/news/longhorizon-harness-advancing-long-horizon-agents-for-real-world-tasks.jsonld"}}