A team from the InfRec Cardinal AI Lab, the National University of Singapore and several other universities has posted The Trinity, a framework in which an AI agent rewrites its own harness, the code that sits around a frozen model and decides how it perceives, remembers, plans and acts. The paper reports that the evolved harnesses raise mean scores by 34 points across 28 training benchmarks and by 26 points across 18 benchmarks the system did not train on, including two tests on real robots. The model itself never changes. Every gain comes from the scaffolding.
The paper went up on arXiv on October 26, 2026. As of October 29, the GitHub repository says the code is "coming soon" and will be released within one week of October 28.
What a harness is, and why it matters
Most agent work today pairs a strong model with a hand-built loop: a system prompt, some memory, tool calls, retry logic. The Trinity treats that loop as a set of six replaceable parts. The paper names them Perception, Memory, Inference, Planning, Orchestration and Loop. Perception extracts facts from an observation. Memory builds a view of the history. Inference keeps track of the candidate explanations that still fit. Planning ranks options. Orchestration picks which tools apply. Loop decides whether to act now or hold back.
The authors argue that hand-tuning this loop does not keep up as tasks multiply, and that existing self-improvement work mostly targets text tasks such as coding and math and tunes one task at a time. Their bet is that very different tasks share the same underlying skills. Their example: the ARC-AGI-3 puzzle games and a Micromouse maze both depend on reading the current state correctly and tracking how it changes.
Other recent work takes related routes. Google's open-source Harness² also automates changes to an agent's scaffolding while the model weights stay fixed, and Meta and UIUC's EvoHarness-RL instead trains the model itself to manage its harness.
How the system works
The framework runs three roles on top of one frozen model, which in the paper is Claude Opus 5.
- Evolver reads benchmark specifications and verified run logs, then regroups the tasks by the skills they need instead of by topic. The result is a capability tree with six shared skills: perception and state tracking, hypothesis and counterpart inference, constraint checking and feedback repair, goal commitment and value trade-offs, video evidence gathering, and video comprehension.
- Creator builds simplified, checkable practice worlds for each node of that tree. The paper calls this Real2Sim2Real: learn the shared skill in a small simulated world, then measure transfer on the original tasks.
- Explorer plays those worlds and evolves reusable modules. A child node inherits its parent's modules where they help and refines them locally, which produces a tree of specialized harnesses.
Because different branches end up good at different things, a router then picks one harness per task, using only public task information and past verified experience.

The numbers
All runs use the same frozen model. The base harness, with no learned modules and no skills, scores 39.06 on the 28 training benchmarks. After four rounds of self-improvement the training mean reaches 73.16. On the unseen set the mean moves from 37.45 to 63.61 across all 18 benchmarks (Table 8). On the 16 unseen benchmarks that do not use a physical robot, Figure 6 shows a rise from 42.1 to 64.1.
Most of the gain arrives in the first round. The paper says rounds 2 to 4 add another 9.4 points on the training mean and 6.4 points on the 16 non-robot unseen benchmarks. Not every task moves: Mastermind stays at 88.9 from round 1 to round 4, and Eleusis slips from 82.2 to 81.1.
Two design checks stand out in Table 3, which compares organizations after one round without skills:
- Grouping tasks into a capability tree and training in simulated worlds scored 56.95 on training tasks and 47.26 on unseen tasks, the highest of the five setups tested.
- The same tree trained on the real benchmark tasks scored 53.44 and 42.31. One global harness shared across all 28 tasks scored 53.04 and 42.92.
The simulated version cost more to train (405.70 million tokens against 211.56 million for the real-task tree), but used the fewest tokens at inference of the five setups.

Against other agent harnesses
The authors also ran OpenAI's Codex CLI harness and the DeepSeek Harness on the 16 non-robot unseen benchmarks, with the same model and settings. Their means were 47.5 and 46.2, against 64.1 for The Trinity's round-4 harness. Per benchmark, the round-4 harness scored higher than both on 14 of the 16. It scored lower than both on Crafter (60, against 82.7 for Codex and 70 for DeepSeek) and on DiG-bench (36.8, against 40.4 and 54.4). On ALE-Bench the margin over DeepSeek was 0.5 points (91.9 against 91.4).
The robot tests
Two embodied tasks were mapped onto an existing node of the capability tree. A Unitree G1 robot had to approach a desk beside a white fan and reach toward it. An AlohaMini2 robot had to uncover three upside-down cups and report whether a cube was under one, its color and its location. Real-robot success went from 0% with the base harness to 60% with the round-4 harness on both tasks. Each real-robot figure comes from 10 episodes, so one episode moves the rate by 10 points.
Caveats worth reading
- The headline scores use an oracle. Per Appendix D, each round's score uses the best-scoring compatible harness for each instance, chosen after the fact. The deployable router, which has to choose in advance, scored 71.27 on training tasks and 60.96 on unseen tasks, against 73.16 and 63.61 for the oracle (Table 4).
- Small training sets. 21 of the 28 training benchmarks use three instances with 9 to 45 episodes each, so a single episode can shift a score by about 2 to 11 points.
- Subsets. Six unseen benchmarks run on fixed subsets. SciGym, for example, uses 126 of 137 systems, the ones the model's safety layer did not refuse.
- Skills are mixed in. Each harness also gets skills summarized from five practice runs per benchmark. Table 2 shows modules alone reach 56.95 on training tasks and skills alone 58.86, so both contribute. The robot section says its results do not isolate the two.
- One model. Every result uses Claude Opus 5. The paper does not test whether the evolved harnesses carry over to other models.
Why it matters
For engineers building agents, the useful claim is narrow: with the model held fixed, automatically searching over harness modules by shared skill gave large gains on this benchmark mix, and an intervention test supports it. Adding one relevant module to the base harness raised its training score from 39.06 to 58.45, while adding an irrelevant one moved it to 40.08 (Table 5). That points to harness design, not only model choice, as a lever worth measuring. Whether the result holds up will depend on the code release and on runs with other models.
