Writing
November 12, 2026 · 6 min read

Teaching a robot in its context, not its weights

A frozen LLM agent learns each RoboTwin 2.0 task from one demonstration by rehearsing in simulation and writing a semantic Task Memory, reaching 83.4% with no gradient updates. Here is what might explain why the context held up under randomization where trained weights did not, and where the comparison needs care.

robot-manipulationin-context-learningagentic-aisimulationfoundation-models

Most robot manipulation work stores skill in network weights. You collect demonstrations, train a vision-language-action model or a world action model, and the skill ends up in the parameters. That works, but the skill only holds up on the data distribution it was trained on. World In-Context Learning for Agentic Robot Manipulation (Fang et al., HUST and ArcheOne AI) takes another route. A frozen foundation model learns each task from one demonstration by rehearsing it in a simulator. It writes what it learns into a text document the authors call a Task Memory, and the model weights never change.

The headline number is 83.4% mean success across all 50 tasks of RoboTwin 2.0, averaged over clean and randomized scenes. That uses one demonstration per task and no gradient updates. The strongest trained policy in their table, 4D-WAM with 50 demonstrations per task, reaches 61.7%. To me, the more interesting part is why the gap appears.

The missing ingredient was feedback, not demonstrations

In-context learning for robots is not new. Models can already attempt a task from a single demonstration placed in their prompt. The authors argue that this approach has stalled for a structural reason. A demonstration recorded in one scene tells the robot nothing about what will happen on the table in front of it. A plain in-context learner gets no feedback from the world.

They compare it to coding agents. A coding agent learns an unfamiliar repository by running code in a terminal and reading what comes back. WICL (World In-Context Learning) puts a simulator where the terminal would be. The model starts from the demonstration, tries the task on training scenes, reads the outcome, and revises its context. The model doing the revising is the same frozen model that acts.

WICL pipeline: one demo, rehearsal in simulation with feedback revising the memory, a frozen Task Memory, and deployment on clean, randomized, and real-robot scenes, with a reflection loop and weights frozen throughout

Why context transfers when weights do not

The central claim is that what the agent learns in context is semantic. The Task Memory is a structured Markdown document. It records object roles, the workflow of each stage, grasp and place specifications written relative to object parts ("approach the handle from the left and grasp at its midpoint"), learned parameters, and lessons from failed attempts. It contains no coordinates. A memory linter rejects positions, ground-truth terms, and instance identifiers.

My working hypothesis is that this design choice is behind the randomization result, which I think is the most important finding in the paper. The paper does not ablate the linter, so treat the link as plausible rather than established. Trained policies keep at most 65.1% of their clean-scene success when RoboTwin randomizes textures, lighting, table height, and distractors. FastWAM is the extreme case: it falls from 77.8% to 1.9%. RoboScript rehearses only on clean scenes, yet the three foundation models keep 95.2% to 100.8% of their clean success. GPT-6.1-Sol scores 83.6% clean and 83.2% randomized.

As a physicist, I would describe this as working with the right invariants. Weights can absorb every regularity of the training world, including irrelevant ones such as lighting. A text memory restricted to object roles and relative geometry has little room to encode appearance, so I would expect it to be less prone to overfitting to it. That is a hypothesis, and the evidence for it is limited to RoboTwin's randomization axes and the four real-robot tasks. The failure analysis is consistent with it. Of 166 failed GPT-6.1-Sol episodes, knowledge failures barely change between settings (37 clean, 38 randomized). Execution failures rise from 23 to 29, consistent with randomized table heights making the motion itself harder. The authors summarize it this way: the failures under randomization are physical, not epistemic.

What the ablations say

The ablations in Table 2 are what I would read first, because they try to separate the two inputs. They cover 10 of the 50 tasks, with 10 episodes per task per setting, and the authors note that this subset excludes the costliest, hardest-to-learn tasks. Read them as directional evidence on that subset:

  • Demonstration without world interaction gave no statistically significant improvement in this experiment. A memory written from the demo alone scores 69.0%. A memory holding only the instruction scores 68.0% (pairwise p ≥ 0.76). With rehearsal, the same demo reaches 78.5% (p = 0.003).
  • World interaction without a demonstration scored lower. Rehearsing from the instruction alone drops the relearned setup from 86.0% to 56.5%, the largest gap in the study, and two tasks never converge. This variant also removes the demonstration-anchored completion check, as the authors point out, so the drop reflects both losses and does not isolate the demonstration's contribution.
  • Recovery matters at deployment. If an episode ends at its first failed action, success falls from 78.5% to 69.0%.
  • Privileged simulator data is not doing the work. Removing ground-truth supervision from learning gives 86.5% against 86.0%.

The last result matters for anyone thinking about real hardware. The acting agent only ever sees RGB-D images and proprioception. Every action returns a receipt (commanded pose, achieved pose, gripper opening, whether an object is held) computed from proprioception and the planner, not from simulator state.

Reflection without retraining

Because the memory is readable text, the system can improve it after deployment. A reflection agent reads episode records over disjoint evaluation blocks and writes guidance for the next block. On the 17 weak tasks, net gains were +18, +8, and +4 rescued episodes over three rounds. That is real improvement, and it is clearly shrinking, which is the honest shape of the curve. The same memories also transferred to a physical dual-arm PiPER robot through an adapter that remaps kinematics and gripper parameters, with no new demos and no new rehearsal. Success there was 10/10, 7/10, 7/10, and 6/10 on four tasks.

Where I would be careful

This is a strong result, but it is not a like-for-like comparison with end-to-end policies, and the paper's own numbers show the differences:

  • Evaluation size. RoboScript is evaluated on 10 episodes per task per setting, 1,000 episodes in total, while the trained baselines use 100 episodes. The authors report a 95% Wilson interval of 81.0 to 85.6 on the mean. That is reasonable at the aggregate level, but per-task numbers are noisy.
  • Cost and latency. One evaluation episode with GPT-6.1-Sol takes about 55 model calls and 2.33 million tokens. Learning and evaluating all 50 tasks cost about 1,911 USD at list prices. A trained policy runs a forward pass at control rate. These are different operating points.
  • Scaffolding. The agent works on top of a large stack: depth-first perception with a three-way identity vote, motion planning, and a skill library that a coding agent writes and validates per environment. The trained baselines do not get this stack.
  • Real-robot scope. The physical tests cover four tasks with offline-planned action sequences and human supervision. That is a proof of transfer, not a deployment result.
  • Endpoint variance. The authors note that API service quality can move success rates by several points between sessions.

None of this weakens the main point, which I find convincing within its scope. On RoboTwin 2.0's multi-step tasks, where the hard part is knowing what to do and in what order, a simulator in the loop plus a semantic memory held up across the benchmark's randomization far better than the trained baselines did. Whether that carries over to other benchmarks and other kinds of visual shift is still untested. The open question is the boundary: which tasks are dominated by semantics, and which by contact dynamics that a text memory cannot express. Execution failures already make up a growing share of what remains.

Takeaway

The pattern will look familiar to anyone who builds agentic systems. The capability does not come from a better model. It comes from a feedback loop in a safe, resettable environment, plus discipline about what is allowed into memory. My guess is that the linter that rejects coordinates matters to this result as much as the choice of foundation model, though the paper does not test that directly. Code is at ArcheOne-AI/RoboScript, and the project page has the figures.

References
  1. 01World In-Context Learning for Agentic Robot Manipulation (Fang et al., arXiv:2611.12885)
  2. 02RoboScript code (ArcheOne-AI)
  3. 03RoboScript project page