AI news and explainers at 7 AM weekdays, plus a Sunday weekly at 8Get it in your inbox

METAL LAB

Hierarchical Self-Improvement: A Framework for Task-Specific Evolvable Agent Harnesses

arXiv:2608.084662026-08-08

Letting an AI keep rewriting the scaffolding around itself, without touching the model, improved its performance

An LLM agent's performance depends not just on the model itself but on the harness, the surrounding code scaffold of prompts, tools, and memory that lets it actually complete tasks. This paper introduces Hierarchical Self-Improvement (HSI), where a single frozen LLM operates at three nested levels to rewrite its own task harness and even the strategy used to rewrite that harness. Tested on the BALROG benchmark with DeepSeek-V4-Flash-Preview as the frozen backbone, HSI improved consistently on moderate-difficulty tasks but showed no gain on a task (NLE) that exceeded the model's own capability.

METAL LAB explanatory visual

Letting an AI keep rewriting the scaffolding around itself, without touching the model, improved its performance

  1. 01A single frozen (parameters unchanged) LLM is given three separated roles: executing the task harness, rewriting the harness ('evolver'), and rewriting the evolver's own strategy ('meta-evolver'), with the outermost execution logic kept frozen to prevent uncontrolled self-reference
  2. 02Reasoning ('thinking') was turned off during task execution but kept on during self-modification, isolating whether gains came from harness improvements rather than extra inference-time reasoning
  3. 03On moderate-difficulty BALROG tasks, raw % Progress gains over the initial harness reached +39.3 on BabyAI, +33.0 on Crafter, +25.0 on TextWorld, and +15.0 on MiniHack
  4. 04On BabaIsAI, with 20% of tasks held out entirely during evolution, the evolved harness still achieved 0.98 best-test progress on BreakStop and 1.00 on GoTo, showing genuine generalization rather than memorization
  5. 05On NLE, a task beyond the frozen model's capability, harness evolution produced no meaningful improvement, revealing a clear ceiling on what harness rewriting alone can fix
An explanatory diagram made by METAL LAB, not a figure supplied by the paper's authors.

What they did

  1. A single frozen (parameters unchanged) LLM is given three separated roles: executing the task harness, rewriting the harness ('evolver'), and rewriting the evolver's own strategy ('meta-evolver'), with the outermost execution logic kept frozen to prevent uncontrolled self-reference
  2. Reasoning ('thinking') was turned off during task execution but kept on during self-modification, isolating whether gains came from harness improvements rather than extra inference-time reasoning
  3. On moderate-difficulty BALROG tasks, raw % Progress gains over the initial harness reached +39.3 on BabyAI, +33.0 on Crafter, +25.0 on TextWorld, and +15.0 on MiniHack
  4. On BabaIsAI, with 20% of tasks held out entirely during evolution, the evolved harness still achieved 0.98 best-test progress on BreakStop and 1.00 on GoTo, showing genuine generalization rather than memorization
  5. On NLE, a task beyond the frozen model's capability, harness evolution produced no meaningful improvement, revealing a clear ceiling on what harness rewriting alone can fix
Figure 1: The HSI framework. A single frozen LLM M operates across three hierarchical scopes with disjoint editable surfaces. The task-harness scope executes the task-specific harness H; the evolver scope rewrites H through seed selection, main evolution, and commit selection; and the meta-evolver scope rewrites the evolver strategy Σ, including seed, evolution, commit, and final version selection policies.
Figure 1: The HSI framework. A single frozen LLM M operates across three hierarchical scopes with disjoint editable surfaces. The task-harness scope executes the task-specific harness H; the evolver scope rewrites H through seed selection, main evolution, and commit selection; and the meta-evolver scope rewrites the evolver strategy Σ, including seed, evolution, commit, and final version selection policies.
Table 1: BALROG leaderboard comparison under Setup A. The top block lists public-leaderboard numbers (retrieved 2026-08-03) from frontier models under their native configurations, reported as % Progress (15) (mean ± standard deviation across evaluation episodes). The bottom block reports HSI on the same task suite using a single frozen DeepSeek-V4-Flash backbone, isolating the contribution of the continuously evolvable hot-swappable task harness: the init-harness baseline, the meta-evolution-off arm, and the meta-evolution-on arm (bolded) that exports the deployed harness. BabaIsAI is omitted because our sub-suite protocol (§4.2.2) differs from the leaderboard’s mixed-task protocol. Avg reports the unweighted mean across the five environments, with its std the unweighted mean of the per-environment stds.
LLMBabyAICrafterTextWorldMiniHackNLEAvg
Gemini-3-Pro96.0±2.857.3±4.460.2±7.540.0±7.76.8±3.252.1±5.1
Gemini-3.1-Pro-Thinking98.0±2.055.0±6.475.7±6.427.5±7.12.6±0.351.8±4.4
Gemini-3.1-Pro100.0±0.046.8±4.266.5±7.535.0±7.53.0±0.550.3±3.9
Gemini-3-Flash86.0±4.945.0±6.350.2±8.130.0±7.24.0±0.843.0±5.5
Grok-476.0±6.057.3±3.962.9±7.917.5±6.01.8±0.843.1±4.9
Claude-Opus-4.580.0±5.749.5±3.151.4±8.427.5±7.12.0±0.542.1±5.0
Claude-Opus-4.5-Thinking72.0±6.348.6±3.259.0±8.030.0±7.22.4±0.342.4±5.0
Gemini-2.5-Pro-Exp-03-2580.0±5.755.0±6.049.2±8.217.5±6.01.7±0.240.7±5.2
DeepSeek-R174.0±6.236.4±3.821.8±6.125.0±6.81.4±0.531.7±4.7
GPT-5-minimal-think80.0±5.739.1±4.130.6±7.020.0±7.31.3±0.534.2±4.9
Claude-3.5-Sonnet68.0±6.632.7±3.242.1±5.415.0±5.60.6±0.531.7±4.3
GPT-4o77.6±3.733.1±2.339.3±5.210.0±4.70.4±0.432.1±3.3
DS-V4-Flash (Init harness)42.0±3.511.6±5.040.0±6.20.8±1.90.018.9±3.3
DS-V4-Flash w. HSI (meta-off)77.3±1.236.4±1.646.0±2.45.8±3.80.033.1±1.8
DS-V4-Flash w. HSI (meta-on)81.3±4.244.6±3.265.0±3.015.8±2.90.2±0.341.4±2.7
Figure 2: HSI evolution trajectory on Crafter (Setup A, meta-on). The dev reward climbs from the init-harness baseline 0.166 to an iteration-best 0.578 by iteration 4 (green-starred as the exported best version), with a regression in iteration 5. Each iteration’s annotation card reports four fields on the task-harness and evolver scopes (seed origin, main-evolution edit, result, commit pool) plus a green-tinted meta field summarizing what the meta-evolver rewrote in the evolver strategy Σ that iteration. The dominant lever uncovered by the evolver is making hidden game feedback explicit: reward signal, inventory state, and crafting feasibility, successively exposed in the harness context; the meta-evolver’s contribution is to codify these patterns into Σ so later iterations inherit them.
Figure 2: HSI evolution trajectory on Crafter (Setup A, meta-on). The dev reward climbs from the init-harness baseline 0.166 to an iteration-best 0.578 by iteration 4 (green-starred as the exported best version), with a regression in iteration 5. Each iteration’s annotation card reports four fields on the task-harness and evolver scopes (seed origin, main-evolution edit, result, commit pool) plus a green-tinted meta field summarizing what the meta-evolver rewrote in the evolver strategy Σ that iteration. The dominant lever uncovered by the evolver is making hidden game feedback explicit: reward signal, inventory state, and crafting feasibility, successively exposed in the harness context; the meta-evolver’s contribution is to codify these patterns into Σ so later iterations inherit them.
Table 2: BabaIsAI sub-suite results under Setup B (split evolution with 20% held-out test). “Best Dev” denotes the highest development reward selected during evolution. Test results are reported as mean ± across-task standard deviation of task progress. Init Harness is averaged over three baseline runs.
Sub-suiteInit HarnessBest DevBest Test (meta-on)Best Test (meta-off)
BreakStop0.0333±0.03341.00000.9800±0.06321.0000±0.0000
GoTo0.1818±0.08021.00001.0000±0.00000.9636±0.0809
Make0.00000.55560.3625±0.32840.3375±0.2029
Figure 3: HSI evolution trajectory on BabaIsAI-Make (Setup B, meta-on). The main blue curve is the dev reward across all reward_history evaluations; red rings mark commit-pool versions. Orange triangles (△) flag commits finalized in val mode (no dev evaluation recorded on the commit itself): each △ sits at the commit’s anchor x with the val reward on the y-axis, and a dashed vertical line drops from the dev anchor to the val reward so the dev→val evaluation structure reads directly off the trajectory. The dev peak climbs 0.222→0.333→0.444→0.556 across five iterations as the agent introduces a single-react rewrite with plan tracking (iter 1), a spatial-map builder with WIN-target persistence (iter 2), auto-target computation with BFS pathfinding (iter 3), an auto-push mechanism with directional fallback (iter 4), and LLM-aware cross-room navigation (iter 5); the meta-evolver codifies the “LLM targets, BFS navigates” two-layer pattern and progressively expands the commit pool from one to three versions. The △ markers expose which iterations’ primary commits were validated on held-out val tasks, an evaluation structure unique to Setup B.
Figure 3: HSI evolution trajectory on BabaIsAI-Make (Setup B, meta-on). The main blue curve is the dev reward across all reward_history evaluations; red rings mark commit-pool versions. Orange triangles (△) flag commits finalized in val mode (no dev evaluation recorded on the commit itself): each △ sits at the commit’s anchor x with the val reward on the y-axis, and a dashed vertical line drops from the dev anchor to the val reward so the dev→val evaluation structure reads directly off the trajectory. The dev peak climbs 0.222→0.333→0.444→0.556 across five iterations as the agent introduces a single-react rewrite with plan tracking (iter 1), a spatial-map builder with WIN-target persistence (iter 2), auto-target computation with BFS pathfinding (iter 3), an auto-push mechanism with directional fallback (iter 4), and LLM-aware cross-room navigation (iter 5); the meta-evolver codifies the “LLM targets, BFS navigates” two-layer pattern and progressively expands the commit pool from one to three versions. The △ markers expose which iterations’ primary commits were validated on held-out val tasks, an evaluation structure unique to Setup B.
Table 3: Per-suite experimental configuration. Shared settings are listed in the prose above; only the entries below vary across suites.
SuiteSetupDevValTest ep.Dev ep.Test rep.MetaSubmit-best
TextWorldA1.00.001033off50
BabyAIA1.00.001033on80
CrafterA1.00.00533on50
MiniHackA1.00.00513on80
NLEA1.00.00511on50
BabaIsAI-BreakStopB0.80.20511off80
BabaIsAI-GoToB0.80.25511on80
BabaIsAI-MakeB0.80.25511on80
Table 4: Representative harness evolution and self-improvement methods compared with HSI. Proposer: who proposes harness edits; Surface: the editable code surface; Domain: primary evaluation domain; Feature: the method’s distinguishing contribution in short form.
MethodProposerSurfaceDomainFeature
Meta-HarnessExternal strongerFull harness codeCoding, mathFull-trajectory feedback
Self-HarnessSelf (target)Config interfaceCodingModel-specific edits
AHEExternal strongerDecoupled compsCodingObservability bottleneck
HarnessXMulti-agentTyped processors5 benchmarksOperational mirror to RL
DGMSelfFull codebaseCodingArchive-based search
HGMSelfFull codebaseCodingClade meta-productivity
GEASelf (group)Codebase + expCodingShared experience pool
SICASelfFull codebaseCodingFramework saturation
HyperAgentsFused selfCodebase + metaCoding, robotsEditable meta-mechanism
Live-SWE-AgentSelf (runtime)Tools on-the-flyCodingZero offline cost
TTHESelf (test-time)Harness populationCoding, SQLUnlabeled trace adaptation
Rethinking Eval.— (critique)CodingTest-time-scaling confound
Statistical Limits— (theory)PAC learningVC bound ⇔ learnability
HSI (Ours)Same frozen M3-layer hierarchyBALROGEndogenous hierarchy with frozen outer anchor

Why it matters

Most agent improvements today rely on humans manually tweaking prompts or tools, but this work shows the surrounding scaffold itself can be safely and hierarchically self-modified by the AI without changing model weights. It also empirically pinpoints where such self-improvement stops working, giving practical guidance on when to invest in harness engineering versus upgrading the underlying model.

Terms in this paper

  • harness · the executable scaffold of prompts, tools, memory, and control logic that wraps around an LLM to run tasks
  • frozen LLM · a language model whose trained parameters are kept fixed and never updated
  • evolver / meta-evolver · the role that rewrites the task harness, and the role one level above that rewrites the evolver's own strategy
  • % Progress · a 0-100 scale metric in the BALROG benchmark measuring how much of a task was completed
  • held-out generalization · testing on tasks never seen during the improvement process to check if gains transfer to new, unseen cases

Original abstract (English)

Modern LLM agents are often improved by modifying prompts, tools, or workflows manually, while the executable scaffold surrounding the model---the harness---is typically treated as a fixed artifact after deployment. This work studies an alternative where the harness is task-specific and continuously evolvable: each task family maintains its own harness, which is hot-swapped across iterations through a fixed task-injection seam and rewritten using environment feedback. We introduce Hierarchical Self-Improvement (HSI), a framework in which a single frozen LLM M operates across three hierarchical scopes: a task harness H that executes tasks, an evolver that rewrites H, and a meta-evolver that rewrites the evolver's strategy code under a frozen outer anchor. A thinking-on/off design isolates the contribution of harness evolution by disabling reasoning during task execution while enabling it during self-modification. HSI is bounded by two factors: a feedback-fidelity bound, since evolution requires informative reward signals to guide selection, and a backbone capability bound, since harness redesign cannot overcome limitations of the frozen model. On BALROG with DeepSeek-V4-Flash-Preview as the frozen backbone, HSI achieves consistent gains over the initial harness on moderate-difficulty tasks (+39.3 on BabyAI, +33.0 on Crafter, +25.0 on TextWorld, and +15.0 on MiniHack, all in raw \% Progress), while obtaining strong held-out generalization on BabaIsAI sub-suites (0.98 best-test on BreakStop and 1.00 on GoTo from a 20% unseen split). On tasks beyond the backbone's capability (NLE), harness evolution provides no improvement. These results demonstrate task-specific harness evolution as a viable axis for improving frozen LLM agents under clear empirical limits. Code is available at https://github.com/TailinZhou/hsi.

Authors · Tailin Zhou

Read on arXiv

Latest papers

All papers →

Latest from METAL LAB

Figures: Tailin Zhou et al., arXiv:2608.08466, CC BY 4.0