Architecture
~9 min readUpdated: December 2026

openJiuwen CUA Harness: 93.5% OSWorld-Verified via Bounded Context & Rails

openJiuwen Long-Horizon Computer-Use Agent Harness Architecture in Smoke Monkey

Huawei's openJiuwen computer-use harness (arXiv:2611.36988, github.com/openJiuwen-ai/computer-use) achieves 93.5% on OSWorld-Verified (361 tasks) with Claude Opus 5—10.1pp above Anthropic's own agent—using zero extra LLM calls via bounded w=3 screenshots, read-only probing gates, and disk verification.

Technical Review: Smoke Monkey Core Architecture Team
Tested on Node.js 18+ & BunTypeScript 5.x
Quick Answer & Executive Definition

openJiuwen CUA Harness: 93.5% OSWorld-Verified via Bounded Context & Rails: Huawei's openJiuwen computer-use harness (arXiv:2611.36988, github.com/openJiuwen-ai/computer-use) achieves 93.5% on OSWorld-Verified (361 tasks) with Claude Opus 5—10.1pp above Anthropic's own agent—using zero extra LLM calls via bounded w=3 screenshots, read-only probing gates, and disk verification. Designed as a zero-dependency, open-source TypeScript architecture under the MIT License with native Model Context Protocol (MCP) support and deterministic phase state machines.

Key Architectural Takeaways
Quick Implementation Exampleopenjiuwen-cua-harness-agent.ts
openjiuwen-cua-harness-agent.tstypescript
import { createAgent } from '@smoke-monkey/harness';
const desktopAgent = createAgent({
agentId: 'openjiuwen-cua-desktop-runner',
provider: 'anthropic',
model: 'claude-opus-4-5',
workspacePath: process.cwd(),
maxGuiActions: 100,
screenshotWindowSize: 3,
permissions: {
read_file: 'allow',
write_file: 'allow',
run_command: 'allow',
},
mcpServers: {
desktopRails: {
command: 'python3',
args: ['-m', 'openjiuwen_cua_mcp', '--window-bound', '3', '--repeat-block', '3'],
},
},
});
async function executeMultiAppWorkflow() {
const result = await desktopAgent.run(
'Probe installed LibreOffice & Thunderbird configs read-only, transform the CSV via Python shell when file-based, edit the presentation slide via GUI pixels, and verify saved XML on disk.'
);
console.log('Desktop Task Result:', result.summary);
}
executeMultiAppWorkflow().catch(console.error);
Video Guides

Watch: Related Video Guides

AI Agent Harness Explained in 5 Minutes (Loop, Tools, Context, Guardrails, Evals)

Agent Harness explained in 8min..

What Is openJiuwen's CUA Harness? Solving Drift, Knowledge Gaps & Error Compounding

openJiuwen's computer-use harness (arXiv:2611.36988, github.com/openJiuwen-ai/computer-use) demonstrates that wrapping a fixed general model inside deterministic engineering rails yields massive reliability gains without RL fine-tuning or multi-agent splitting. Rather than separating GUI clickers from shell coders like CoAct-1 or Agent S2, openJiuwen runs one unified loop that picks between GUI pixels and shell/code tools at every step, governed by three harness mechanisms:

  1. State & Context Management (`kappa_t`, `chi_t`): Keeps [P, E, K, q, b] (prompt, machine snapshot, skills, task, gate briefing) permanently at the prefix for prompt caching; replaces screenshots older than w = 3 with an omitted-shot marker rho; tracks hidden harness state z_t (GUI budget left, unsaved edits per window e_t(u), consecutive look-only steps l_t, repeated identical failures k_t); injects transient end-of-context recitation n_t (deleted after the turn); and refuses identical failing calls after N_block retries.
  2. Probing Before Acting (`beta`): A read-only pre-flight gate verifies files, app capabilities, and skills—expanding any quoted skill rule back to its full paragraph so preconditions are never lost—and aborts early as infeasible *only* with hard evidence.
  3. Verifying After Acting (`omega`): Brings the target window to the front before sending input, attaches an explicit check / fail status and fresh window capture to every desktop reply, and inspects saved files directly from disk rather than trusting screenshots.

OSWorld-Verified Benchmarks: Model-Matched Comparison (361 Tasks)

Evaluated on OSWorld-Verified (361 desktop tasks under a 100-step GUI budget), openJiuwen hits 93.5% overall with Claude Opus 5—beating Anthropic's own Opus 5 agent (83.4%) by +10.1 percentage points and the #2 leaderboard entry Intelligence-Indeed (90.2%) by +3.3 points, using the exact same model weights.

OSWorld-Verified DomainTasksAnthropic Opus 5Intelligence-IndeedopenJiuwen CUA (Opus 5)
GIMP2688.0%92.3%100.0%
LibreOffice Writer2395.7%95.7%100.0%
OS2479.2%100.0%100.0%
LibreOffice Calc / Impress47 / 4795.7% / 80.6%97.9% / 91.4%97.9% / 97.7%
VS Code / Thunderbird23 / 1591.3% / 73.3%95.7% / 86.7%95.7% / 93.3%
Multi-apps9376.8%84.7%89.5%
Chrome / VLC46 / 1780.2% / 82.4%78.1% / 99.4%80.3% / 98.1%
Overall (361 tasks)36183.4%90.2%93.5%

Transient Recitation Preserves Prompt Cache Hit Rates

By keeping `[P, E, K, q, b]` immutable at the prompt start and stripping transient notices `n_t` after each LLM call returns, openJiuwen refreshes goal/budget awareness at the attention-heavy end of context without invalidating the KV prompt cache.

Implementing Bounded Screenshot Context & Admission Rails

Replicate openJiuwen's context-construction rule kappa_t(M_t) and repeat-failure admission gate chi_t(a_t) inside any TypeScript or Python agent runtime.

typescript
export function buildBoundedContext(history: Turn[], notices: string, w = 3) {
  const shotIndices = history
    .map((t, idx) => (t.hasScreenshot ? idx : -1))
    .filter((idx) => idx !== -1);
  const keepSet = new Set(shotIndices.slice(-w));

  const trimmedHistory = history.map((turn, idx) => {
    if (turn.hasScreenshot && !keepSet.has(idx)) {
      return { ...turn, screenshot: '[screenshot removed; screen may have changed]' };
    }
    return turn;
  });

  // Transient notice appended ONLY for this inference call, never saved to history
  return [...trimmedHistory, { role: 'system_transient', content: notices }];
}

Applying Hyper-Agent Harness Rails in Smoke Monkey

Smoke Monkey Harness shares the same core philosophy: model intelligence alone fails long-horizon engineering without deterministic harness rails. Combining Smoke Monkey's phase transitions, pre-edit file probing, and compiler/test disk verification with openJiuwen's w=3 bounded perception and repeat-failure blockers keeps coding and desktop agents grounded over 50–100+ step trajectories.

Google Search Questions & Answers

Frequently Asked Questions

Q:How did openJiuwen beat Anthropic's own Opus 5 agent by 10.1% using the exact same model?

Both ran Claude Opus 5 with a 100-step budget on OSWorld-Verified. openJiuwen's harness mechanisms—read-only probing, `w=3` bounded screenshots, transient budget/unsaved-edit recitation, repeat-failure admission rails, and disk verification—drove the jump from 83.4% to 93.5%.

Q:Does openJiuwen use extra LLM reflection calls after every desktop action?

No. Unlike Reflexion or Mobile-Agent-v2, openJiuwen's Verifying After Acting (`omega`) uses zero extra model calls—checking window focus in code, returning a fresh window capture, and inspecting saved files on disk.

Q:Why does openJiuwen combine GUI clicks and shell/code execution in a single loop?

Splitting tasks upfront between separate GUI and coder agents creates handoff friction. A single unified loop uses shell/code when artifacts live on disk and pixel-targeted GUI actions when open desktop apps hold live state.

Q:How does openJiuwen prevent prompt-cache misses when reciting state every turn?

Task-wide facts stay fixed at the front of the prompt, older screenshots collapse to a static marker after `w=3` turns, and the transient notice block `n_t` is appended for a single call and removed from persistent history.

Related Alternatives & Comparisons

Related Architecture Guides

View all guides

Build with Smoke Monkey Harness

Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.

npm install smoke-monkey-harness