Hugging Face trained one model across Claude Code, Codex, OpenCode, and Mini-SWE-Agent. The results expose a blind spot in how we benchmark and build AI systems.

By Sumant Thakur

Published: 2026-10-07

URL: https://sumantthakur.substack.com/p/the-same-model-is-not-the-same-agent



Hugging Face’s FineEnvs team recently published one of the most useful AI engineering posts I have read this year:

The ultimate guide to multi-harness RL

It is part technical guide, part open-source framework, and part research report. The authors explain how they trained a small open model through four real agent harnesses: Claude Code, Codex, OpenCode, and Mini-SWE-Agent.

The original is worth reading for the full implementation, interactive comparisons, code, training setup, and unusually candid discussion of what failed.

But the post also reveals something larger than a new reinforcement-learning technique.

It challenges how we talk about model capability.

The article begins with an external comparison in which the same model, GLM-5.2, reportedly scored 23% in one coding harness and 52% in another on SWE-bench Pro.

The model weights did not change.

The benchmark did not change.

The software around the model did.

The Hugging Face team then found a similar pattern in its own experiment. Before training, the same LFM2.5-2.6B model solved 62% of held-out tasks through Mini-SWE-Agent but only 33% through Claude Code.

Again, the model was identical.

Only the runtime changed.

That gap is too large to dismiss as interface trivia.

It suggests that the number we casually call “model performance” is often the performance of a much larger system.

The model supplies potential capability. The harness determines how much of that capability becomes observable behaviour.


What exactly is a harness?

A model does not independently inspect a repository, choose a tool, execute a command, read the output, revise its plan, and decide when the work is complete.

It generates responses.

The agent harness turns those responses into an operating loop.

It decides:

-

what context the model receives,

-

which tools it can use,

-

how those tools are described,

-

how tool results return to the model,

-

whether malformed calls are repaired,

-

when earlier context is compressed,

-

whether the model may retry,

-

how work is verified,

-

and when the process should stop.

In the Hugging Face article’s terminology, the model is the policy. The agent is the model operating inside the harness, with tools, state, and a control loop around it.

That distinction matters.

The model may contain the reasoning capacity required to solve a task, but the harness determines the world in which that reasoning operates.

One harness may provide a repository map, concise tool descriptions, useful test output, and automatic recovery after a malformed call.

Another may send an enormous undifferentiated context, expose tools through unfamiliar schemas, and terminate the session before the model can recover.

The weights are the same.

The operational contract is not.


Why the score changes

A harness can change model behaviour along several dimensions.

The model sees a different problem

Context construction determines which parts of the world become visible.

One harness may surface the relevant source files and recent test failures. Another may fill the context with verbose schemas, long command histories, and stale information.

The task description may be identical, but the effective problem presented to the model is different.

The model receives a different action space

One harness may expose structured tools such as readfile, searchrepository, applypatch, and runtests.

Another may provide a shell.

A third may expect the model to produce prose-based edit blocks.

A model can understand what it needs to do while still failing to express the action in the particular dialect expected by the harness.

The model follows a different control loop

Some harnesses retry failed calls.

Some ask the model to reflect after tests fail.

Some compress old messages.

Some repair malformed JSON.

Some manage planning outside the model.

Some leave almost every decision to the model itself.

These choices alter the trajectory from request to result.

The harness decides what completion means

One system may treat a final text response as completion.

Another may require a patch.

Another may run tests automatically and reject the result.

Another may ask the model to inspect its changes before submission.

The same reasoning can therefore receive different scores because the surrounding system validates and interprets the output differently.

This makes the conventional benchmark label incomplete:

Model X: 52%

A more honest representation would be:

Model X + Harness Y + Tool Configuration Z + Context Policy C + Budget B + Evaluator E: 52%

It is less elegant on a leaderboard.

It is closer to what was actually measured.


What Hugging Face trained

The FineEnvs researchers trained LFM2.5-2.6B in two configurations.

One model trained only through OpenCode.

The other trained across four harnesses:

-

OpenCode

-

Claude Code

-

Codex

-

Mini-SWE-Agent

They used 1,000 data-analysis training tasks and evaluated the resulting models on 250 held-out tasks under all four harnesses.

The architectural challenge was that these harnesses control their own execution loops.

They decide when to call the model, what messages to send, how to invoke tools, how to alter the history, and when to stop. They were not built to expose the internals a reinforcement-learning trainer normally expects.

The researchers solved this by placing a capture proxy between each harness and the model endpoint.

Conceptually, the path looked like this:

Harness → capture proxy → model

The harness continued operating largely unchanged.

The proxy observed the requests and responses crossing the model boundary, recorded the exact generated tokens and associated probabilities needed for training, and returned responses in the API format the harness expected.

The wider framework combined OpenEnv as the environment interface, Harbor for tasks and sandboxes, and TRL as the trainer.

That design contains a useful architectural lesson of its own:

When several complex systems cannot expose the same internal interface, find the narrow external boundary every one of them must cross.

In this case, that boundary was the model API.


The result was not simply “multi-harness wins”

Both reinforcement-learning runs improved.

At the final checkpoint:

-

the OpenCode-only model reached 52.3% average accuracy,

-

the multi-harness model reached 54.2%.

The 1.9-point difference was within the experiment’s reported noise. Overall accuracy alone did not clearly separate the two approaches.

The more interesting result appeared when performance was separated by harness.

The OpenCode-only model became strongest inside OpenCode, the runtime in which it had trained. Most of its improvement was concentrated there, rising from roughly 34% to 58%.

The multi-harness model improved across all four environments. It performed better than the OpenCode-only model under Claude Code and Codex, tied it under Mini-SWE-Agent, and remained weaker under OpenCode.

That leads to a more precise conclusion:

Training in one runtime concentrated the improvement. Training across several runtimes distributed it.

The multi-harness model also used 31% fewer tool calls than the base model on tasks both could solve. The OpenCode-only model reduced calls by 11%, and its efficiency gains transferred less consistently to unfamiliar harnesses. Fine Envs Multi Harness RL

The experiment does have important limitations.

Each setup was run with one seed, and the two training runs did not receive equal data exposure. The multi-harness run processed substantially more training tokens, partly because Claude Code rewrites its history during execution. The authors therefore describe the comparison as observational rather than a clean causal verdict.

That restraint strengthens the work.

The result is not proof that every model should always train across every harness.

It is evidence that runtime diversity changes what a model learns.


A model can overfit to its runtime

We usually associate overfitting with task data.

But agentic models can also overfit to the conventions of the system in which they operate.

A model repeatedly trained inside one harness can learn:

-

its tool names,

-

its argument formats,

-

its message structure,

-

its context layout,

-

its retry conventions,

-

and its stopping rules.

The Hugging Face article groups this into three broad categories: overfitting to the action format, the context structure, and the control flow.

The model is not only learning how to solve the task.

It is learning the accent of one runtime.

Move it elsewhere and several things can happen.

It may still solve the task, but less reliably.

It may use more tools and tokens.

It may depend on retries that the new harness does not provide.

It may call a familiar tool name that does not exist.

It may stop too early.

It may never stop at all.

This exposes a weakness in the phrase model agnostic.

A platform may support several models through a common API.

That proves API compatibility.

It does not prove that each model behaves equally well inside the platform.


Three kinds of portability

Agent platforms should distinguish between at least three forms of portability.

API portability

Can the model be connected to the harness?

Can the runtime send requests in a supported format and receive valid responses?

This is the easiest layer to demonstrate.

Behavioural portability

After the model is connected, does it still:

-

choose tools correctly,

-

recover from failures,

-

use context effectively,

-

complete tasks reliably,

-

and stop at the right time?

This is where harness overfitting becomes visible.

Operational portability

Can the organisation preserve acceptable:

-

cost,

-

latency,

-

observability,

-

policy compliance,

-

auditability,

-

and failure behaviour?

A model may technically function in a new harness while consuming twice the tokens, making many more tool calls, or becoming harder to govern.

That is compatibility on paper and regression in production.


This is not only a coding-agent problem

Coding harnesses make the issue easy to observe because the tools and outcomes are concrete.

But the same principle applies to almost every multi-step AI system.

A customer-support agent depends on retrieval, customer history, escalation rules, available CRM actions, and restrictions on account changes.

A research agent depends on search providers, document parsing, source ranking, citation checks, and stopping behaviour.

An infrastructure agent depends on cloud inventory, permissions, policy checks, approval state, and whether it may only propose a change or execute one.

A financial operations agent depends on ledger access, reconciliation rules, transaction limits, and human approval boundaries.

In every case, the model is only one component.

The surrounding runtime determines:

-

what the model knows,

-

what it may do,

-

what happens after failure,

-

what counts as success,

-

and who remains responsible for the result.

The harness is therefore becoming less like wrapper code and more like a control plane for AI behaviour.


Reward design is also product design

One of the most instructive findings in the Hugging Face post came from an earlier set of training runs.

Those models were initially rewarded only for correctness.

That sounds reasonable. Solve the task and receive a reward.

But correctness alone gave the model no reason to finish efficiently.

During some runs, tool usage increased. One model kept calling tools without submitting a final answer. Another produced responses that grew beyond the evaluation limit.

The later LFM experiments included a small efficiency bonus for correct answers that used fewer tool calls.

Tool usage fell during those runs, although the researchers correctly note that they did not conduct a matching ablation, so the bonus cannot be claimed as the sole cause.

The broader lesson extends beyond reinforcement learning:

A metric does not merely measure agent behaviour. It helps manufacture it.

Reward only correctness, and the system may ignore cost and latency.

Reward only speed, and it may skip verification.

Treat escalation as failure, and the agent may act confidently when it should ask for help.

Reward tool activity, and it may become industrious without becoming useful.

The omissions in an objective eventually become product behaviour.


What engineering leaders should change

The Hugging Face experiment points toward several practical changes.

Benchmark the deployed combination

Do not evaluate only a model.

Evaluate the model inside the harness, tools, permissions, context strategy, budget, and verification process you expect to use in production.

The best model under someone else’s runtime may not be the best model under yours.

Treat harness changes as behavioural releases

Changing a tool description, retry policy, context-compaction strategy, or stopping rule may alter performance even when the model version remains fixed.

These changes need regression tests, controlled rollout, telemetry, and versioning.

They are not harmless plumbing refactors.

Capture trajectories, not just answers

A final answer tells you whether the task succeeded.

It does not tell you why.

Teams need visibility into:

-

the context supplied,

-

the tools selected,

-

the observations returned,

-

the retries attempted,

-

the history compressed,

-

the cost incurred,

-

and the decision to stop.

Without the trajectory, a large performance change becomes a mystery.

With it, the change becomes an engineering problem.

Decide who owns the harness

As agent systems mature, the harness may contain more organisation-specific value than the model itself:

-

tool contracts,

-

permissions,

-

context policy,

-

routing,

-

telemetry,

-

approval logic,

-

cost controls,

-

and evaluation rules.

Models will continue to change.

The operating system around them may become the more durable layer.

That raises a strategic question: should this control plane live inside an external agent product, within each application team, or as shared internal platform infrastructure?


The benchmark belongs to the system

During the chatbot era, it was easy to experience the model as the product.

The user entered text.

The model returned text.

The surrounding application felt secondary.

Agentic systems dissolve that simplicity.

The model now operates inside a loop of context, tools, state, permissions, observations, retries, verification, rewards, and termination rules.

That loop determines which parts of the model’s potential become useful behaviour.

So the question:

Which model is best?

is becoming incomplete.

The more useful question is:

Which model, inside which harness, with which tools and operating policy, performs best for this work?

The weights may remain unchanged.

Change the runtime, and you may be dealing with a different agent.

Have you seen the same model behave very differently across two tools or agent platforms? What changed first: tool use, context handling, cost, or stopping behaviour?