跪拜 Guibai
← All articles
Agent · AI Programming

A Unified Runtime Across Agent Harnesses Demands Semantic Normalization, Not a Single Implementation

By pqpo ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Agent teams that mix harnesses break without a runtime that normalizes execution semantics. The difference between a 23% and 52% pass rate on the same model is the harness, and a team orchestrator that treats every harness as a black-box API will silently lose that gap.

Summary

The same model run through different agent harnesses produces radically different capabilities. Experiments on SWE-bench Pro show GLM-5.2's Pass@1 jumping from 23% to 52% solely by switching harnesses, with near-zero correlation between harness rankings across models. A multi-agent team that assigns each expert a different harness-model pair needs a unified runtime to orchestrate them.

That runtime defines a Driver SPI so the core operates on logical sessions without knowing whether Codex, Claude Code, or PI sits underneath. Streaming events get normalized not just by field name but by lifecycle and causal chain: who produced an event, which run and session it belongs to, and whether it has reached a terminal state. Features like MCP, permissions, and skills declare dependencies so the core builds a preparation graph, while a resource scope ensures cleanup even when initialization fails partway.

A feature is not "supported" just because code claims it. The framework demands implementation, conformance to behavioral contracts, and probe evidence from a real harness run. Degraded states with pending evidence make the gap between code-complete and proven-in-practice explicit.

Takeaways
Harness choice alone swung GLM-5.2's SWE-bench Pro Pass@1 from 23% to 52%, and harness rankings between two models showed a correlation of -0.05.
A cross-harness runtime needs three session identities: the system session, the native harness session, and the individual run/turn handle.
Streaming event normalization must capture lifecycle, sequence, and causal chain (runId, parentRunId, sessionId), not just field-name mapping.
Features declare dependencies so the core builds a preparation graph; a unified resource scope reclaims sockets, relays, and registries on failure or close.
Claiming a feature is supported requires implementation, behavioral conformance, and probe evidence from a real harness execution, not just a config flag.
Conclusions

Most multi-model products stop at a model dropdown, but the harness is the larger lever on capability. Treating harnesses as interchangeable backends leaves the biggest performance variable uncontrolled.

Degraded as a first-class state acknowledges that real harnesses rarely fail cleanly into supported or unsupported; they work partially, and tracking that partiality prevents silent failures in production teams.

Event normalization for agent teams is closer to distributed tracing than to chat message formatting. Without parentRunId and causal ordering, a multi-agent system cannot debug why a sub-agent stalled.

Concepts & terms
Agent Harness
The execution environment that determines how a model runs: the agent loop, tool system, workspace access, session management, permissions, context compression, and sub-agent spawning. Different harnesses (Codex, Claude Code, PI) produce different capabilities from the same model.
Runtime Driver SPI
A service-provider interface that each harness implements to plug into a unified runtime. It defines session creation, turn submission, event mapping, cancellation, and steering, so the core operates on logical sessions without knowing the underlying harness.
ACP (Agent Client Protocol)
An open-source protocol by JetBrains and Zed, analogous to LSP but for AI coding agents. Based on JSON-RPC 2.0, it lets a host environment call multiple agents through a standardized interface.
RuntimeResourceScope
A lifecycle-managed container for dynamically created resources (sockets, relays, MCP registry leases, temp directories, subprocesses) that ensures cleanup along a single path whether a session ends normally, fails during initialization, or is cancelled.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗