An agent’s harness determines how it manages context, invokes tools, and handles failures. Reimplementing that behavior inside a trainer can accidentally change the very agent we wanted to improve.

Observe the model boundary

Polar treats a harness as a black box. It proxies model API calls, captures token-level interactions, reconstructs trainable trajectories, and exposes asynchronous rollout services. Runtime prewarming, execution, reconstruction, and evaluation can proceed as separate stages.

The trajectory builder supports per-request traces and token-faithful prefix merging. Merging applies where captured calls preserve compatible append-only token histories; it does not assume that an entire harness session is one uninterrupted conversation.

Why a transcript is not enough

Imagine a tool-using agent that summarizes its conversation halfway through a task. The text shown to the next model call no longer has the full earlier token sequence as its prefix. Concatenating everything the user can read would invent a history the model never saw.

A training trace needs to distinguish sampled actions, tool observations, and changes to context. The probability of an action is conditional on that actual context. Preserving human-readable meaning alone does not preserve the numerical event used by the policy-gradient update.

Evidence across harnesses

The paper trains Qwen3.5-4B with GRPO under four coding harnesses. It reports SWE-bench Verified improvements of 22.6, 4.8, 0.6, and 6.2 percentage points for Codex, Claude Code, Qwen Code, and Pi, respectively. The uneven gains are part of the result: harness-specific starting points and learning opportunities differ.

What to validate at the boundary

A useful integration check follows one sampled response from the inference engine to the learner: token IDs, behavior log-probabilities, action masks, and the context supplied to the model should all describe the same event. Then a small end-to-end run can test whether evaluation and training refer to the same task definition.

Polar extends the rollout-service direction introduced by ProRL Agent. Molt addresses the wider learner and storage loop around those trajectories.


← Explore all notes on agents & RL