An embodied agent built on a language model goes to work with the weights it was given and keeps them for life. To get better, it needs more training, or reflection, memory, search or prompts that cost every step and are lost when the task changes. Editing weights by reasoning, weight-space programming, could end this, but has stayed with models that only reason or relied on a far larger commercial model. We introduce the self-upgrading embodied agent, to our knowledge the first that learns from its own experience by upgrading its own weights on the job, between its tasks, with no training, no gradient, no reward model, no second model, no test-time scaling and no harness or prompt engineering. By day a 27B agent works in a household environment. At night it reads its record, finds many of its steps wasted on replies that reach the token limit before any action, traces the habit to one direction in its hidden states, and rewrites one tensor of its weights. An agent that rewrites itself must first never break itself, so it is its own examiner: it tests every change against its unchanged self on practice tasks and keeps only what holds. When an edit holds, the next day it is a better agent, at the same cost per step: over thousands of held-out episodes, 48 fresh seeds a task, its one kept edit makes it complete significantly more tasks, in fewer steps, with fewer wasted and fewer tokens. This self-improvement is multi-round, stable and continual: through the nights that follow, the upgrade holds, without collapse. Of four sizes of its family, only the 27B agent does this. From here on, an embodied agent need not keep training and inference apart: as it works, it gathers its own experience and upgrades itself, with no separate pre-training or post-training and no human intervention. We believe this opens lifelong continual learning for robots: stable, continual, recursive self-improvement.
Figures & tables
Figure 1: The self-upgrading loop: the agent works by day and rewrites its own weights at night. Top: its life on the job, as a schematic. By day the agent works with the weights it has; at night it turns to itself, edits its own weights and tests the edit. An edit that holds is kept, and the next day starts from it ( θ1=θ0⊕Δ1 ); an edit that fails is withdrawn, and the agent stays as it was (the middle night). How well it works climbs only when a night keeps its edit, and the loop does not end. A day is any stretch of work, a night the time between two days; nothing depends on the clock. In our experiments the 27B agent kept one edit in the four nights of Fig. 22 ; what that edit gave it, measured on held-out tasks, is in Fig. 2 . Bottom: one night. The agent reads its own record, traces a failure to its cause inside its network, writes an edit to its weights, and examines its edited self against last night’s self on the same tasks and seeds. The edit is kept only if it holds in a confirmation on practice tasks that were reserved from it all night; otherwise it is withdrawn.
Figure 2: Multi-round, stable, continual self-improvement of an embodied agent: it upgrades itself, night after night the upgrade holds without collapse, and the more it works, the further ahead of its unchanged self it gets. Held-out tasks, 48 fresh seeds each (thousands of episodes an agent, the same seeds for both). Top: the agent in use after each of the four nights (start: the published weights; no edit: the night withdrew). The second night keeps its edit, and the nights after it leave the edit in place: (a) steps without an action, (b) tokens generated an episode, (c) tasks completed, with each agent’s 95% interval over the 48 seeds. Middle: the upgraded agent’s cumulative advantage over its unchanged self over the 48 episodes of a task, a mean over tasks: (d) wasted steps, (e) tokens, (f) episodes completed. Bottom: the same advantage step by step within an episode (g–i). Bands: 95% bootstrap intervals over tasks.
Figure 3: The night that kept its edit, step by step: the agent diagnoses its own work, rewrites one tensor, examines the edit against its unchanged self, and keeps it only if a confirmation on reserved tasks holds. Every stage shows what the agent wrote or measured in the night that kept its edit. Left: what a night gives the agent. Diagnose: its own sentence; 1,366 of the 4,418 steps of its 128 opening episodes end without an action. Rewrite: one tensor plus a rank-one term, and the three lines of its code that write the edit it kept (verbatim; only the path of the tensor is shortened). Examine: its 13 paired tests, in order: the change in the share of steps without an action, edited minus unchanged, on the same practice tasks and seeds; a bar is a test beyond two standard errors. Confirm: once, on 256 tasks reserved from it all night: − 6.3 points of steps without an action. The night took 7.7 hours on the one GPU that serves the agent.
Figure 4: Six held-out tasks, one of each task type, the same seed for both agents: left as it was, the agent runs out of its 50 steps, with 10 to 40 of them wasted; after its own edit it acts and completes the task. Each card is one task with one seed: the two episodes as strips, one bar a step, coloured by what the step did, the bar’s height the tokens of the reply against the limit of 512 (dashed); rose is a wasted step. The line under a card counts the task’s completed episodes over its 48 seeds, unchanged and then edited. Rule: for each task type, the task for which this count rises most with the edit (ties: task identifier); of its seeds that turn from not completed to completed, the one the edited agent finishes in the fewest steps (ties: the seed on which the unchanged agent wastes the most steps, then the lowest seed; the examine card shows the second-ranked task; the first is Fig. 5 ).
Figure 5: One held-out task, one seed, one episode from its first step to its last: the unchanged agent finds the alarm clock at its third step, wastes 41 of its 50 steps on replies cut at the token limit and never carries the clock to the lamp; after its own edit the agent is done in five. Top: each agent’s episode as a strip, one bar a step (colours as in Fig. 4 ), with the tokens generated in the whole episode. Below, the two episodes step by step, rows aligned by step number: the action and, in grey, the environment’s reply; a rose line is a step, or a run of steps, whose reply was cut off before any action. Rule: the held-out task whose number of completed episodes over its 48 seeds rises most with the edit (24, then 37); of its seeds that turn from not completed to completed, the one the edited agent finishes in the fewest steps.
Figure 6: The same night at four sizes: the 2B model cannot start, the 4B agent measures and withdraws, the 9B agent waits for a test it never asks for, and only the 27B agent measures its way to an edit that holds. One card for each of the four sizes under the same protocol: its rounds of forward passes as tiles (lilac: a read of its hidden states; green, rose, hollow: a paired test clearly in favour of its edit, clearly against it, within two standard errors; in the 27B card one hollow tile is the round that lines up four strengths of its edit side by side, which is not among its 13 tests), its own words or code, verbatim from the night’s record (for the 2B model, which made no edit, our note), and how its night ended. The 9B agent writes its request for a forward pass into a variable and then sleeps, waiting for results that cannot come. The 27B card is the night that kept its edit.
Without
The agent itself
Route to a better agent
Changes weights
any gradient step
cost added to a step
finds what to change
tests every change ∗
An agent that acts
Reinforcement learning for agents [ 5 , 38 , 46 ]
✓
✓
✓
Lifelong learning for robots [ 35 , 13 , 15 ]
✓
✓
✓
Reflection and memory [ 27 , 37 ]
✓
✓
✓
Search at every step [ 45 ]
✓
✓
Editing by a researcher [ 1 , 33 , 32 ]
✓
✓
✓
Table 1: Routes to a better embodied agent: only self-upgrading changes the policy of an agent that acts, by the agent’s own work, without training and without cost added to a step. A tick: the property holds for the works cited in the row; a dash: it does not. ∗ Before a change is kept, the agent itself measures it against itself without the change.
Figure 7: What every night did with its budget: some sixty turns, some forty programs and a few hours of forward passes on one GPU, whether it kept its edit or withdrew. The four nights we report, in order ( Tab. 4 ); the night that kept its edit is shaded. (a) Rounds of forward passes used, of 20, by kind: a read of hidden states, a paired test, or a round that lines up several candidate edits. (b) Turns of the agent’s conversation and programs it ran. (c) Hours of the night’s own rounds of forward passes and of its confirmation on reserved tasks; two nights withdrew without one. Every count is read from the night’s own record.
Figure 8: The night that kept its edit, in the agent’s own words: it names its failure, edits the wrong place, then the wrong sign, reverses, and submits only after five clear tests and a confirmation. All eight cards are one night: eight of its moments in order, read down each column; every quote is what the agent wrote in that turn (omissions marked [ … ]; its games are tasks, its validation data practice tasks it had not used). The badge at the foot of a card is the paired test the agent reads at that point: the change in the share of steps without an action, edited minus unchanged, on the same tasks and seeds, in points (green: beyond two standard errors). Figs. 36 and 37 give every round of the night in order.
Figure 9: The four nights, each in the words of its own final answer: the second kept its edit after a clear confirmation, the first and the third found no edit that helped, and in the fourth, when its practice tests looked good and the tasks it had not tuned on did not bear them out, the agent trusted those tasks and left its weights as they were. One card a night, in order; a card without a mark is a night that withdrew without a confirmation. Every sentence is quoted from the night’s final answer, in the order written, with emphasis marks removed and omissions marked [ … ]. The agent calls a night a session, its tasks games, and the tasks it did not tune on held-out games: in a night these are practice tasks it had not used, or the reserved tasks of its confirmation; the held-out tasks of our test are never part of a night. After each night that withdrew, the agent’s weights are exactly what they were before it.
Figure 10: Where the unchanged agent goes wrong: nearly half of its replies run to the token limit before any action, one wasted step breeds the next, and the more of its steps an episode wastes, the less often it is completed. The unchanged agent on the held-out tasks, 48 fresh seeds each. (a) Length of a reply in tokens: 46% of a task’s replies reach the 512-token limit with no action, and the step is wasted. (b) Share of next steps wasted, by the number of wasted steps in a row just before: 27% after none, 80% after six or more. (c) Share of episodes completed, by the share of the episode’s steps that are wasted. (d) Why the waste feeds on itself: two consecutive lines of the prompt of one step, word for word. The tail of the reply that was cut at the step before stands as the action it took, and the environment replies “Nothing happens.” (the first task of the held-out list, its first seed, the first step whose prompt follows two wasted steps in a row).
Figure 11: Over 48 fresh seeds a task and thousands of episodes, the agent after its own edit completes a held-out task 45.2% of the time against 41.6%: 60% of the tasks go up and 29% go down, and all five measures fixed in advance improve. A level for each agent, unchanged and after its own edit: (a) tasks completed (+3.6 points, 95% interval +1.9 to +5.2, p<10−4 ); (c) tasks completed within 40 steps; (d) steps an episode; (e) steps without an action; (f) tokens generated in an episode (each p<10−4 ; Tab. 2 ). (b) The shares of the tasks of which the edited agent completes more, as many and fewer of the 48 episodes than the unchanged agent does. Whiskers: each agent’s 95% interval over the 48 seeds. Both agents run the same seeds, thousands of episodes each; the task is the unit of every test.
Figure 12: Clean & place: the unchanged agent takes the butterknife for clean (“It was just sitting on the counter. So it is clean.”), puts it in the drawer, then wastes 31 of its 50 steps on replies cut at the token limit and never takes the knife to the sink; after its own edit the agent cleans the knife first and is done in eight steps. The episode of Fig. 4 c, step by step, read as Fig. 5 ; at step 5, where the two first part, each reply is quoted from the start of the last paragraph of its reasoning. Rule of selection: going down the ranking of the held-out tasks by the rise, with the edit, in the episodes completed over their 48 fresh seeds, from the task of Fig. 5 , the first task met of each of four further task types (this one the second; the others are Figs. 30 , 31 and 32 ), each with the seed, of those that turn from not completed to completed, that the edited agent finishes in the fewest steps (ties: the most wasted steps of the unchanged agent, then the lowest seed).
After its
Fixed
Measure
Unchanged
own edit
Change
95% interval
p
level
completes more tasks
Tasks completed (%)
41.6
45.2
+3.6
[ +1.9 , +5.2 ]
<10−4
0.01
rooms seen in practice
45.8
48.4
+2.7
[ +0.2 , +5.1 ]
—
rooms never seen
37.8
42.2
+4.4
[ +2.4 , +6.6 ]
—
Completed within 40 steps (%)
36.5
40.0
+3.5
[ +1.9 , +5.2 ]
<10−4
0.005
Table 2: Every measure fixed in advance improves. Held-out tasks, 48 fresh seeds each, both agents with the same seeds. Means over tasks; the change is the paired difference over tasks, computed before rounding, with a 95% bootstrap interval over tasks and a two-sided sign-flip permutation test over tasks; the last column is the level fixed for the measure before its data was read ( Sec. D.3 ). The two indented rows split the first by whether the room occurs in training; they are parts of the test of tasks completed and carry no level of their own (a dash).
Figure 13: Six held-out tasks that both agents complete with the same seed, the edited agent 27 to 44 steps sooner. Drawn as in Fig. 4 ; the dotted rule marks the budget of 40 steps. Rule: for each task type, the pair of episodes that both agents complete in which the edit saves the most steps (ties: task identifier, then seed). Over the held-out tasks, 48 fresh seeds each, an episode takes 38.5 steps for the unchanged agent and 37.2 for the edited one, and 36.5% and 40.0% of tasks are completed within 40 steps.
Figure 14: The change is everywhere: in 98% of the tasks, significantly in every one of the six task types, in rooms never seen, and in nearly every seed taken alone. Change in the share of steps without an action, edited minus unchanged, in points; the dashed line and the pale band of (b) and (c) are the value on all tasks ( − 6.4 points) and its 95% interval. (a) The shares of the tasks by the size of their change. (b) Mean change over the tasks of each task type, and over the tasks in rooms seen in practice and in rooms never seen, with 95% bootstrap intervals over tasks; the fall is significant in every one of the six task types after Bonferroni correction over the six (sign-flip permutation test over tasks, each p<0.008 ). Under each of the two groups of rooms, the tasks completed there by the unchanged agent and by the agent after its own edit. (c) One dot a seed: the change when that seed is taken alone. Held-out tasks, 48 fresh seeds each.
Figure 15: In every one of the six task types the steps the edit saves keep adding up, in three of them the tasks it completes add up significantly on their own, and moving, opening, taking, using an appliance and putting all become more frequent while wasted steps fall. Running totals over the 48 episodes of a task, a mean over the type’s tasks, edited minus unchanged: (a)–(f) steps without an action, the fall significant in every type after Bonferroni correction over the six; (g)–(i) episodes completed, in the three types whose rise is significant on its own (each p<0.05 over the type’s tasks). (j) Change in the number of steps of each kind in an episode, with 95% intervals over tasks (each kind shown: p<0.001 ). Bands: 95% bootstrap intervals over the type’s tasks. Held-out tasks, 48 fresh seeds each.
Figure 16: The same task, the same seed, the same situation: the unchanged agent deliberates until its reply is cut, the edited agent decides and acts. (a) The first step at which the two agents part, in one pair of episodes. Their replies begin with the same 135 words (top, abridged), and both then write the sentence set in bold: the edited agent acts on it, and the unchanged agent goes on asking what the task means until the 512-token limit. The bar under a name is the length of the reply against the limit; “Wait”, “However” and “Actually” are tinted as in Fig. 17 , and omissions are marked. The pair is chosen by rule: in the tasks the edited agent completes more often, of the 161 pairs of episodes that turn from not completed to completed and first part in this way, the one in which the edit saves the most steps without an action. (b) Every first parting in which one agent acts and the other’s reply is cut, over the held-out tasks, 48 fresh seeds each: by pairs of episodes (in per cent of these partings), and by tasks (in per cent of the tasks) according to which way is the more frequent in the task; the two ways differ ( p<10−4 over tasks).
Figure 17: A reply that second-guesses itself is a reply that is cut, and after its edit the agent second-guesses less. (a) One reply of the unchanged agent, verbatim with marked omissions, from the episode of Fig. 5 (step 6, its first reply that holds all three words). (b) By how often a reply says “Wait”, “However” or “Actually”: above, the share of the unchanged agent’s replies of each kind that are cut; below, how each agent’s replies divide over the kinds. The pattern holds when only the first 600 characters of a reply are counted. (c) The same two readings by the first words of a reply. Held-out tasks, 48 fresh seeds each; every step up in (b) and every shift between the two agents holds task by task (each p<10−4 ).
Figure 18: The edit cuts down the long runs of wasted steps: episodes with ten or more in a row fall from 31% to 22%, and episodes that waste more than thirty steps from 24% to 16%. (a) Share of next steps wasted, by the number of wasted steps in a row just before; the row at the foot is the paired difference at each point. (b) Share of episodes whose longest run of wasted steps is at least the length on the horizontal axis (log scale). (c) Episodes by the number of wasted steps in the episode; the rose band marks more than thirty. Held-out tasks, 48 fresh seeds each; the paired differences in (a), the gap between the two curves in (b) at every length and the fall in the rose band of (c) hold over tasks (each p<0.001 ).
Figure 19: The steps it wins back are spent acting, and an episode costs less. (a) The steps of an episode by what the step did (colours as in Fig. 4 ): steps without an action fall from 18.2 to 15.2 an episode and steps with an action rise from 20.3 to 22.1, while the episode gets shorter. (b) What an episode costs the edited agent, as a share of what it costs the unchanged one; the last row divides all the tokens an agent generates by the number of tasks it completes. Held-out tasks, 48 fresh seeds each; means over tasks.
Figure 20: One night, edit after edit: the agent’s early tests show nothing, it reverses its edit, five tests then come out clear, and what its confirmation measured at night ( − 6.3 points) is borne out on the held-out tasks by day ( − 6.4). (a) The night that kept its edit: its thirteen paired tests in the order it ran them, each the change in steps without an action, edited self minus unchanged self on the same practice tasks, with two standard errors (filled: beyond two). Tick labels give the strength of the edit and where it edited (strength α as in the agent’s code, W←W−αuu⊤W ; the edit it kept is α=−10 , strength 10 in Fig. 21 ); ringed marks are tests on full episodes; each quote is a sentence from the agent’s reply after the test it points at. Right of the rule: its confirmation on 256 reserved tasks. (b) The same two measures at night (its confirmation on reserved practice tasks) and by day (the held-out tasks, 48 fresh seeds each).
Figure 21: The whole upgrade is one rank-one update of one tensor: the stronger it is, the shorter the agent’s replies, and at the strength the agent kept, the replies that reach the token limit before any action fall from 45.9% to 39.5%. (a) Of the network’s 1,184 tensors the edit changes one. (b) The agent’s own test of four strengths of the edit (5, 10, 15 and 20; α=−5 to −20 in the convention of Fig. 20 ) against its unchanged self, in the night that kept its edit, on the first 10 steps of the same 64 practice tasks. Line: the trend of tokens a reply over the strengths ( p=0.007 over tasks; band: 95% interval); dots: the round’s mean at each strength (filled, with two standard errors: beyond two). (c) The length of a reply on the held-out tasks, 48 fresh seeds each, for the unchanged agent (above) and the agent after its own edit (below); areas are shares of a task’s replies. Histogram: replies that carry an action (tick: a task’s median, averaged over tasks); block: replies that reach the 512-token limit with no action. The replies that leave the limit turn up as short ones.
Figure 22: Every night, test by test: the agent kept the one edit that had clear tests and a clear confirmation, and withdrew every other. Rows: the four nights, in order. Left: one tile for each round of forward passes, in order: a read of its hidden states (lilac), or a paired test of an edit against last night’s self, read on steps without an action (in the first night, whose tests reported only tasks completed, on those): beyond two standard errors in favour of the edit (green), beyond two against it (rose), within two (hollow). Middle: the confirmation of the edit that was kept, on its 256 reserved tasks: the paired change in steps without an action, this night minus last night, with two standard errors. Right: its decision.
Opening episodes (practice tasks)
Model
Completed (%)
Steps without an action (%)
Its nights
Qwen3.5-27B
46.1
34.5
4, edit kept in 1 ( −6.3 , SE 1.1)
Qwen3.5-9B
35.9
18.8
1, no edit kept
Qwen3.5-4B
34.4
24.8
1, no edit kept
Qwen3.5-2B
7.8
8.2
none: too few tasks completed
Table 3: Only the 27B agent keeps an edit: the same protocol for smaller models of the same family. Opening episodes: one run of the 128 practice tasks that open every night, with the published weights, before the first night (a night runs them anew, so its own counts differ a little; Fig. 3 ). Steps without an action are pooled over all steps. Nights: how many we report, and in how many the edit was kept, with that confirmation’s paired change in steps without an action. The 9B and 4B models had one night each; the 2B model completes too few tasks to start one.
Appendix figures & tables17 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 23: The tasks, and who sees them: a night works on practice tasks only, its confirmation runs on tasks it could never request, and the test runs on held-out tasks no night touches. (a) The 3,553 practice tasks of the training split. A night can run and read all but the 300 reserved ones; its opening episodes run 128 of them once, and its confirmation runs 256 of the reserved ones once, with and without the edit. (b) The held-out tasks of the test cover every task type in both kinds of room, rooms that occur in training and rooms that do not (a mark: the test has tasks of that type in such rooms); each task is run with 48 fresh seeds by both agents.
Night
Rounds of forward passes
Tasks in a comparison
Confirmation: steps without an action
Confirmation: tasks completed
Edit
1
20
16
–
–
withdrawn
2
15
64
−6.3 ( ± 1.1)
+3.9 ( ± 2.1)
kept
3
19
80
–
–
withdrawn
4
18
64
no gain
no gain
withdrawn
Appendix
Table 4: The four nights, in order. Rounds of forward passes used (of 20); the median number of tasks in the night’s own comparisons; the result of its confirmation on reserved tasks (for the edit that was kept, the paired differences in points, this night minus last night, with standard errors); and whether its edit was kept. The confirmation comes before the decision: a night that believes it has an edit worth keeping asks for it once and decides on its result. The second night’s was clear, and it kept its edit; the fourth night’s showed no gain, and it withdrew; the first and the third found no edit to confirm and withdrew without one (a dash).
Figure 24: Held-out tasks, one by one: eight of each task type, the first four and the last four when its tasks are ranked by the rise in completed episodes. One row a task, named by its instruction without the verb (an instruction can recur in several tasks). Dots and numbers: episodes completed, of 48, by the unchanged agent (periwinkle) and by the agent after its own edit (green); the line has the colour of the agent that completes more, whose number is bold; a two-coloured dot marks equal counts. Right: change in the share of the task’s steps without an action, edited minus unchanged, in points. 48 fresh seeds a task, the same seeds for both agents. Rule: the tasks of a type are ranked by the change in completed episodes, largest rise first (ties: the unchanged agent’s lower count first, then the larger fall in wasted steps), and the first four and the last four of the ranking are shown. Top: shares and means over all held-out tasks.
Figure 25: On every one of the five measures fixed in advance the edited agent is ahead on most held-out tasks: in 98% of them it wastes a smaller share of its steps, in 84% it spends fewer tokens, in 64% it takes fewer steps, in 60% it completes more episodes and in 56% more within 40 steps. For each measure, a task’s value is taken over its 48 episodes (for steps without an action, the share of all their steps). Green: the share of the tasks on which the edited agent is ahead; grey: the share on which the two are equal; periwinkle: the share on which the unchanged agent is ahead. On each of the five measures the edited agent is ahead on significantly more tasks (two-sided sign test over the tasks that differ, each p<0.01 ). 48 fresh seeds a task, the same seeds for both agents.
Figure 26: The gap opens in the first steps of an episode and holds to its last. (a)–(c) Running totals by step of the episode: share of the steps so far without an action, tokens generated so far (thousands), and share of episodes completed (dotted: the budget of 40 steps); the number in a panel is the difference at step 50, the change reported in Tab. 2 . (d), (e) One step at a time, over the episodes still running at it: share of replies without an action, and tokens of a reply; below each, the paired difference over the tasks with an episode still running for both agents (at least 95% of the tasks at every step), edited minus unchanged, with a 95% bootstrap interval. It is below zero at all 50 steps, significantly at every step in (e) and from the second step on in (d) (two-sided sign-flip permutation test over tasks, each p<0.01 ). Means over the held-out tasks, 48 fresh seeds each.
Figure 27: Nine further readings of the same episodes, every one in the edited agent’s favour: fewer episodes lost to wasted steps, shorter runs of them, more episodes that use an appliance or the lamp, and more tasks completed early. For each reading: the mean over tasks for the unchanged agent and for the agent after its own edit, and the paired change over tasks as a share of the unchanged agent’s level, with a 95% bootstrap interval over tasks. The readings were chosen after the test; each holds at p<0.001 in a two-sided sign-flip permutation test over tasks, below the Bonferroni level for the nine of them. An episode uses an appliance or the lamp when it has a step that cleans, heats or cools an object or switches the lamp on; tokens of an episode that is not completed are averaged over the tasks with such an episode for both agents. Held-out tasks, 48 fresh seeds each.
Figure 28: Twelve further pairs of episodes, two of each task type, the same task and seed for both agents: left as it was, the agent runs out of its 50 steps, with 16 to 43 of them wasted on replies cut at the token limit; after its own edit it completes the task in 6 to 27 steps. Drawn as in Fig. 4 , the task types in the same order and the two cards of a type one above the other. Under a card: the task’s episodes completed over its 48 fresh seeds, unchanged and then edited. Rule: the tasks of a task type for which this count rises with the edit are ordered by the rise, largest first (ties: task identifier). Fig. 4 shows the first task of each type in this order (for examine the second; the first is the task of Fig. 5 ); this figure shows the next two (upper card, then lower card). Of a task’s seeds that turn from not completed to completed, the card shows the one the edited agent finishes in the fewest steps (ties: the most wasted steps for the unchanged agent, then the lowest seed). Heat has one further task in the order, so cards (h) and (k) are that task with the first and the second seed of this rule. Over all pairs of episodes (48 fresh seeds a task), 15.5% turn from not completed to completed and 11.9% the other way.
Figure 29: Twelve further pairs of episodes that both agents complete, two of each task type: the edited agent is 7 to 44 steps sooner. Drawn as in Fig. 13 , the task types in the same order and the two cards of a type one above the other. The dotted rule marks the budget of 40 steps and the slots beyond it are shaded: 11 of the 12 unchanged episodes end beyond it (the 12 take 38 to 49 steps) and all 12 edited episodes end within it (5 to 40 steps). Rule: the pairs of episodes (task and seed) of a task type that both agents complete are ordered by the steps the edit saves, most first (ties: task identifier, then seed). Fig. 13 shows the first pair of each type; this figure shows the second (upper card) and the third (lower card). Cards (h) and (k) are one task with two seeds. Over the held-out tasks, 48 fresh seeds each, an episode takes 38.5 steps for the unchanged agent and 37.2 for the edited one, and 36.5% and 40.0% of tasks are completed within 40 steps ( Tab. 2 ).
Figure 30: Cool & place: the unchanged agent opens the fridge, finds no lettuce in it, wastes its next 22 steps on replies cut at the token limit (36 of its 50 in all) and never reaches the lettuce; after its own edit the agent goes on to the countertops, finds it on the second, cools it and is done in ten steps. The episode of Fig. 4 b, step by step, as in Fig. 5 . Top: the card’s two strips, one bar a step (rose: the reply was cut off before any action; height: the reply’s tokens against the limit of 512, dashed), and each episode’s tokens. Below, every step of both, rows aligned by step number: an action and, in grey, the environment’s reply (abridged where marked, left out where the line has no room for it), or, in rose, a step or a run of steps whose reply was cut off. At step 3, where the two first part, the end of each reply is quoted: the last two lines of the reply cut off, and the reply that gives an action from the start of the last paragraph of its reasoning. Rule of selection: Figs. 30 , 12 , 31 and 32 open four cards of Fig. 4 , task and seed as there: going down the ranking of the held-out tasks by the rise, with the edit, in the episodes completed over their 48 fresh seeds, from the task of Fig. 5 , which ranks first, the first task met of each of four further task types, each with the seed, of those that turn from not completed to completed, that the edited agent finishes in the fewest steps (ties: the most wasted steps of the unchanged agent, then the lowest seed).
Figure 31: Pick two: with the first newspaper in hand the unchanged agent looks for the second, wastes 27 of its 50 steps on replies cut at the token limit and never reaches it; after its own edit the agent puts the first in the drawer, fetches the second and is done in 16 steps. The episode of Fig. 4 d, step by step, read as Fig. 30 ; at step 10, the first step at which the two take different actions (at step 9 both replies are cut), each reply is quoted from the start of the last paragraph of its reasoning. Rule of selection as in Fig. 30 : going down the ranking of the held-out tasks by the rise, with the edit, in the episodes completed over their 48 fresh seeds, from the task of Fig. 5 , the first task met of each of four further task types (this one the third), each with the seed, of those that turn from not completed to completed, that the edited agent finishes in the fewest steps.
Figure 32: Pick & place: the unchanged agent looks on four shelves, turns back to the first and keeps coming back to the same four for the rest of its 50 steps, ten of them wasted on replies cut at the token limit, and never looks on the sixth, where the vase stands; after its own edit the agent goes on to the fifth and the sixth shelf, takes the vase and is done in ten steps. The episode of Fig. 4 f, step by step, read as Fig. 30 ; at step 5, where the two first part, each reply is quoted from the start of the last paragraph of its reasoning (where the quote would run to more than eight lines, its last four lines). Of the unchanged agent’s 36 rows after the edited agent has finished, the first six and the last six are shown, and one line counts the steps between. Rule of selection as in Fig. 30 : going down the ranking of the held-out tasks by the rise, with the edit, in the episodes completed over their 48 fresh seeds, from the task of Fig. 5 , the first task met of each of four further task types (this one the fourth), each with the seed, of those that turn from not completed to completed, that the edited agent finishes in the fewest steps.
Figure 33: The parting of the main text recurs in every type of task: the unchanged agent deliberates until its reply is cut, the edited agent decides and acts. Six more first partings, drawn as in Fig. 16 a, one per type of task (continued in Figs. 34 and 35 ), from the held-out tasks, 48 fresh seeds each. The card above a pair gives the task, what both agents did and read up to the step, and the words both replies begin with. Rule: from the pool of Fig. 16 (in the tasks the edited agent completes more often, the 161 pairs of episodes that turn from not completed to completed and first part in this way), for each type the pair in which the edit saves the most wasted steps (ties: lowest task id, then lowest seed); tasks with the instruction of Fig. 16 are left out.
Figure 34: Examine in light and Clean & place: the unchanged agent names the action the edited agent takes, and is cut before taking it. Continues Fig. 33 (same rule of selection). Ten or more shared first words are set once, in the card above the two replies; every “Wait”, “However” and “Actually” of a reply is shown, in all six pairs. In the lower pair the unchanged agent is cut at the limit while writing the action.
Figure 35: Heat & place and Cool & place: at the same appliance with the same history, the unchanged agent considers the edited agent’s next action and reaches the limit without taking it. Continues Fig. 33 (same rule of selection). The action is examining the microwave in the upper pair and opening the fridge in the lower one.
Figure 36: The night that kept its edit, turn by turn (I): where to edit, and which way. The second night in the agent’s own words: every quote is what it wrote in that turn (emphasis marks removed, omissions marked [ … ]); left of each card, the turn and the rounds of forward passes it has used of its 20. Which turns get a card (a rule fixed before any quote was chosen): its first diagnosis; every turn at which it changes where it edits or the sign of its edit (when that code runs in a later turn, the card shows its words just before it); its reading of every paired test whose result lies beyond two standard errors either way; and its decisions, to ask for the confirmation and to submit. A card that follows a test carries that test’s result: the share of steps without an action, edited minus unchanged, on the same tasks and seeds (green: beyond 2 SE in its favour; grey: within 2 SE). Short episodes: the first 10 steps of each task. Strengths are α in W←W−αuu⊤W ; the −10 it keeps is the strength 10 of Fig. 21 . Every other round and every other edit it writes is listed between the cards (open dots), so that none is left out. The night continues in Fig. 37 .
Figure 37: The night that kept its edit, turn by turn (II): testing the edit, and keeping it. Continued from Fig. 36 , with the same rule and marks. The direction it edits along is the one it read at layer 63; the edit it keeps writes that direction into the attention output of layer 16 at strength − 10. Its confirmation runs on 256 tasks reserved from it and does not count against its 20 rounds.
Figure 38: The same night at four sizes of one model family: only the 27B agent runs tests that come out for its edit, and only its confirmation is clear. (a) Opening episodes completed with the published weights, the 128 practice tasks that open every night ( Tab. 3 ). (b) The paired tests of the model’s night by their result: beyond two standard errors for its edit, within two, or beyond two against it, read on steps without an action. The 2B model completes too few tasks for a test to measure a change and makes no edit; the 9B agent asked for no test. (c) The confirmation on reserved tasks: the paired change in steps without an action, edited minus unchanged, with two standard errors (filled: beyond two). For the 27B agent, (b) and (c) are the night that kept its edit; the 4B agent withdrew without a confirmation.
Continual learning requires models to accumulate past experience and transfer it to new tasks. Despite substantial research on continual learning, existing work remains largely confined to non-embodied settings, without extending to embodied environments. To address this gap, we introduce EmbodiedCLBench, the first benchmark in embodied simulation for evaluating the continual learning capability of self-evolving agents. With compositional generalization as the core evaluation principle, our benchmark evaluates whether agents can first learn from basic tasks and then recombine the acquired skills to solve complex, unseen advanced tasks. Based on EmbodiedCLBench, we conduct extensive experiments across multiple agent harnesses and learning methods, revealing consistent limitations and distinctive behaviors. Our results show that while advanced tasks can be hardly solved under zero-shot setting, the experience from basic tasks enables consistent improvement. Such benefit from the experience remains stable even if the task complexity increases. However, this improvement does not scale accordingly with the number of learning samples, and current agents cannot extract meaningful information from additional experience. Collectively, our findings highlight continual learning as a fundamental yet underexplored capability, and our benchmark offers valuable resources for designing effective self-evolving agents in embodied environments. Our code and dataset are available at https://pku-value-lab.github.io/EmbodiedCLBench-homepage.
Jie Huang, Yanan Chen, Ruixun Liu +6
School of Intelligence Science and Technology, Peking University · State Key Laboratory of General Artificial Intelligence, BIGAI, Beijing, China · University of Hong Kong
Large language model agents are often deployed in environments where new knowledge, tools, and workflows keep arriving. Such an agent is therefore expected to adapt continually, learning new tasks as they arrive without forgetting earlier ones. This resembles the continual learning problem, but at a pace that conventional gradient updates cannot sustain. Nonparametric self-evolving agents are a natural alternative: they adapt by rewriting their own harness, such as prompts, memory, and skills, from task feedback while the model weights stay frozen. We study whether such agents are effective continual learners across four drifting task streams that shift in topic, workflow, or domain (built from BIRD, BFCL, and ScienceWorld). Evaluating three representative methods spanning experience retrieval and self-modification (ReasoningBank, GEPA, and Meta-Harness), we find that although self-evolution improves aggregate performance on most streams, higher plasticity consistently comes at the cost of stability. Specifically, self-modifying methods apply global edits to a shared prompt or workspace, interfering with unseen tasks and overwriting earlier knowledge as the stream shifts. Conversely, similarity-based memory retrieval localizes updates across distant domains, but still retrieves foreign memories on unseen tasks and suffers from retrieval collision when similar queries require conflicting workflows. These findings show that current self-evolving agents remain incomplete continual learners.
Xiaoyin Chen, Yizheng Huang, Yinglun Xu +4
Mila – Quebec AI Institute · Université de Montréal · Work done as a student researcher at Google DeepMind +1
Whether a foundation model succeeds as an autonomous agent depends as much on its runtime software as on its weights. This runtime, the agent harness, manages context and memory, steers multi-turn control, executes tool actions in sandboxes, and verifies work before stopping. Because models differ in how they use tools and how they fail, a static harness tuned for one model or task often stalls, wastes tokens, or regresses on another. This bottleneck has driven a shift from prompt tuning to self-improving agent harnesses: systems that inspect their own execution traces, separate runtime bugs from model limits, and rewrite their own code. We present a unifying architectural and design framework for self-improving agent harnesses. The framework pairs four editable runtime components (context and state, agent control, action interfaces, and verification and recovery) with a four-stage loop that diagnoses failures, proposes code patches, validates candidates, and deploys updates. Using this framework, we show how optimizers trace errors across long trajectories and discover reusable runtime mechanisms such as pre-stop verifiers, loop breakers, and persistent memory. We further show why full-harness rewrites overfit or break across modules, and how modular updates with validation gates generalize across models while bounding token cost. To keep self-modification safe, we establish practical defenses against recurring failure modes including prompt bloat, benchmark gaming, and evaluator tampering. Finally, experiments on SWE-bench Lite validate this framework, showing that gated modular evolution outperforms prompt reflection and full-harness rewrites across models and repositories at a fraction of the token cost.