openJiuwen: Beyond Static Harnesses for Long-Horizon Coding Agents
openJiuwen Team, Tao Yu, Xinyu Zhang, Qianqian Chen, Xiaoneng Xiang, Chia Kwangyang, Xingchen Huang, Ran Chen, Yangkai Ding, Zheng Wang, Yeo Boon Hong, Bingzheng Gan, Enrui Hu, Shuo Cheng, Deyang Li, Ruifeng Shi, Hongbo Wang, Qi Ye, Xuefeng Jin, Zhangchun Zhao
cs.AI
2026-08-28
openJiuwen adapts runtime around a frozen model via Rails, hitting 82.6% on SWE-bench Verified and 87.19% on Terminal-Bench 2.1, +3.4 and +3.39 vs selected official leaders.
Long-horizon coding agents no longer emit a patch in one shot. They run tens or hundreds of steps over a repository that keeps changing: read files, edit code, run tests, then cut again from the failure. Capabilities have spread from a single agent to delegated sub-agents and multi-agent coordination. The harness, the systems layer that binds model, tools, context, and lifecycle, is now a first-class object.
Existing systems already expose rich machinery, each with a different architecture. Pi keeps a minimal runtime and adds advanced behavior through extensions. DeepSeek Harness makes adapters, tools, session state, and the execution loop replaceable plugins. DeerFlow is a lead agent plus delegates. Codex and Claude Code fold delegation, permissions, hooks, and lifecycle controls into mature products. The features exist. Combining them across topologies still often means rewriting orchestration. Evidence that only appears mid-task, including semantic diagnostics, test outcomes, progress, and context pressure, mostly lands in logs and does not change the next framework decision.
openJiuwen, from Huawei and released as open source, names the two design goals Structural Composability and Runtime Adaptivity.
Every agent instance reuses the same two-loop core: a standalone agent, a delegated sub-agent, or a node inside Swarm Flow.
The Inner Loop is bounded ReAct. It builds context, calls a frozen policy π, runs tools, and writes observations back. The Outer Loop treats one finished Inner Loop as a round, then decides whether to continue, complete, or stop. Continuation comes from composable evaluators: semantic completion, resource caps, user conditions. Input that arrives during an in-flight model call waits for the next boundary. It does not mutate the request in the air.
Cross-cutting capabilities do not live inside the loop. They attach as Rails: security, memory, planning, context engineering, semantic feedback, delegation, human interaction. Each Rail declares which lifecycle hooks it watches, its handler, and its priority. Rails on the same hook run in priority order, with a deterministic tie-break. Visibility gating then lets the same engine expose different Rails and tools to a leader, a sub-agent, or a worker. Adding a capability is a Rail config change, not a new engine.
Swarm Flow turns multi-agent coordination into operators you can rearrange. budget() exposes remaining budget, parallel() fans out branches, compact() drops empty results, pipeline() streams work downstream, agentsession() keeps a stateful session across stages, human() is an optional interrupt, return ends the flow. The paper's example has a leader spawn workers from leftover budget, generate candidates in parallel, review them, arbitrate, and ask a human if confidence is low. That is one composition, not a prescribed architecture.
Runtime adaptivity does not update model weights. It changes three pieces of framework state: context construction, acceptance and stopping, and diagnostic injection.
Context Management compresses under pressure, in stages: dialogue summaries, incremental compression, full-session compaction. Structured diffs and logs get deterministic reduction first. Unproductive repeated reasoning or tool patterns collapse. Large artifacts leave the live window and stay as handles, retrieved on demand.
Goal Mode maps semantic evaluation to continue, complete, or blocked, separate from hard caps on attempts, time, or resources. Self-assessment, independent assessment, and a hybrid all share the same interface. Goal Mode stays inside the current task. Cross-task reuse is Self-Reflection.
LSP-Driven Passive Feedback takes language-server diagnostics after a code change, ranks and deduplicates them under per-file and total caps, then injects the remainder into the next step. Definition and reference lookup remain active queries the agent must request. The mechanism sees type errors and symbol relationships. It does not see architectural quality or business-logic correctness.
Self-Reflection extracts reusable experience after a trajectory finishes, stores it, and retrieves it for a later task. Retrieved experience still goes through Context Management. The policy π never moves.
The two leaderboards do not share a model. The paper states this is a system-level comparison, not a harness ablation.
| Setup | Score | Baseline |
| SWE-bench Verified, Claude Opus 4.5 high | 82.6% | Strongest selected official mark 79.2% (live-SWE-agent and Sonar Foundation Agent, both Claude 4.5 Opus) |
| Terminal-Bench 2.1, GPT-5.6 Sol high | 87.19% | Claude Code + Fable 5 xhigh at 83.8% |
| Terminal-Bench 2.1, Fable 5 high (matched model) | 84.04% | Claude Code 83.8%, Terminus 2 80.4% |
The matched-model Fable 5 gap is 0.24 points. The headline 87.19% swaps in GPT-5.6 Sol, so model strength is in the mix. openJiuwen uses high effort; the Claude Code Fable 5 row is xhigh.
SWE-bench Verified has 500 tasks. Split by estimated fix duration, all rows use Opus 4.5:
| Duration | N | openJiuwen high | Best listed baseline |
| under 15 min | 194 | 91.75% | mini-swe-agent high 89.18% |
| 15 min to 1 hour | 261 | 81.23% | Sonar medium 77.78% |
| 1 to 4 hours | 42 | 52.38% | live-SWE-agent medium 54.76% |
| over 4 hours | 3 | 33.33% | every system 33.33% |
openJiuwen does not win the 1-to-4-hour bucket. In that same bucket, mini-swe-agent with high reasoning scores 35.71%, below its medium setting at 42.86%. The paper's reading is that high effort burns tokens and crowds the context window; openJiuwen still uses high and reaches 52.38%, which they tie to context management. That is an interpretation. There is no controlled isolation of reasoning tokens or context overflow.
Terminal-Bench 2.1 has 89 tasks in 16 categories. Under Fable 5, file operations land at 0.76 versus Claude Code 0.56 and Terminus 2 0.52; system administration at 0.889 versus 0.778 and 0.844. GPT-5.6 Sol pushes system administration to 0.956, software engineering to 0.908, data science to 0.950. Video processing goes the other way: openJiuwen Fable 5 at 0.20, Claude Code at 0.80. The paper credits part of the tool-heavy gains to a broad out-of-the-box tool set, and says the benchmark does not separate tool availability from other harness machinery.
For teams shipping coding agents, the claim is concrete. Do not bake orchestration into each topology. Do not treat runtime evidence as logs. Rails plus the two loops are a reusable execution semantics. Adaptation lives in framework state, so the model policy can stay frozen.
The numbers that survive as claims are the 0.24-point Fable 5 match and the 3.4-point SWE-bench gap against 79.2% systems that also use Claude 4.5 Opus. Prompt, tools, and implementation still differ. The SWE-bench headline uses high effort; live-SWE-agent in the duration table uses medium.
There is no mechanism ablation. How much of 82.6% comes from Rails, LSP feedback, Goal Mode, or Self-Reflection is unknown. The thing to follow is the code, and whether the same stack reproduces on your tools. Those two percentage points are not a measured module-level return.
The paper lists four. Self-Reflection and offline evolution are still sequential stages, not a closed loop. Goal Mode is task-level only, with no hierarchical goals. Context-management strategy selection is still largely manual. Evaluation covers two benchmarks, without finer ablations or a wider model sweep.
The matched-model comparison is nearly a tie. The cross-model 87.19% is not a harness delta. Passive LSP feedback is written up as closed-loop semantic correction; its scope is static diagnostics. The 1-to-4-hour bucket loses to live-SWE-agent, and the over-4-hour bucket has three tasks. Official leaderboard snapshots run from July 2025 through August 2026. The board itself is moving.