# SUN: Agentic Robot Policy Learning with Persistent Task Programs

Robotics.world

> Multi-stage, contact-rich manipulation is hard for both planning-based methods (which struggle with contact dynamics) and reinforcement learning (which struggles with sparse rewards and ambiguous…

**arXiv**: 2608.31167 · Preprint · not peer-reviewed

**Published**: 2026-08-31 · revised · 2026-09-25

**Authors**: Weiqi Wang, Zhi Li, Yudong Lei, David Martinez, Xiaofeng Gao, Yuxin Jiang, Chenfanfu Jiang, Yingnian Wu, Demetri Terzopoulos, Ran Gong

## In plain words

Multi-stage, contact-rich manipulation is hard for both planning-based methods (which struggle with contact dynamics) and reinforcement learning (which struggles with sparse rewards and ambiguous task definitions).

## AI summary

## Overview

- **Research area:** Robot manipulation, agentic AI systems, control-to-learning transfer (model-predictive control, imitation learning, residual reinforcement learning), and sim-to-real deployment.
- **Technical level:** Advanced.
- **Scope:** The paper introduces SUN Programs (persistent, typed task specifications) and the Kuafu agent harness that uses them to verify, learn, and scale multi-stage manipulation policies across nine simulated tasks with zero-shot transfer to two physical robot arms.

## What This Paper Is About

Multi-stage, contact-rich manipulation is hard for both planning-based methods (which struggle with contact dynamics) and reinforcement learning (which struggles with sparse rewards and ambiguous task definitions). The authors' goal is to let a foundation-model agent write an executable task program, prove it works under simulated physics with model-predictive control, and then reuse that *same* verified program as the shared definition of the task for imitation learning, residual RL, and large-scale demonstration generation. The central claim is that keeping one persistent task specification across all these tools, instead of re-deriving the task at each interface, is what makes the whole pipeline work.

## Key Contributions

1. **SUN Programs (Semantically UNified Programs):** A typed, executable task representation that compiles each grounded relation into three aligned views — an MPC objective term, a satisfaction predicate, and an RL learning cost — while keeping the relation's grounding, satisfaction boundary, and stage position invariant. The authors call this correspondence "Semantic Unification."
2. **Persistent task semantics across tool calls:** The accepted program is frozen after MPC verification and then supplies task progression, stage labels, and reward structure to every downstream module, so the task is never re-interpreted between control and learning.
3. **The Kuafu harness:** An agent workflow covering video-based scene preparation, program formation and diagnostic repair, MPC verification, Stage-BC (stage-conditioned behavioral cloning), bounded residual RL with constrained hyperparameter calibration, simulation evaluation, and data production.
4. **An independent, frozen task-success criterion:** A rule-based evaluator generated from the instruction *before* program synthesis, used to detect "false completions" during verification and to filter generated demonstrations.

## Main Findings

- **Program formation is repairable:** Across 5 repeated formation-and-verification runs per task on 9 tasks (45 runs), 29 passed initially and diagnostic repair recovered 14 of the remaining 16, raising yield from 64.4% to 95.6%. T4 and T5 improved from 10% to 100% acceptance.
- **Task composition, not length, drives difficulty:** The 15-stage T6 program succeeded in all 5 runs without any recovery, while T7 had the only 2 unrecovered runs and accounted for 11 of the 30 total recovery cycles. The most common parse errors were axis-reference signs and axis relations, pointing to spatial reasoning failures in orientation-heavy tasks.
- **Kuafu reaches 82.03% task-macro success** across the nine tasks, the highest among learned variants, versus an MPC reference of 83.76%. A three-run version with jointly varied program, mentor set, and residual training averaged 79.43%.
- **Rewards alone fail:** Pure RL scored 0.07% with a naive reward and 0.00% with the SUN reward. Stage-free BC reached 9.44%, Stage-BC 24.75%, bounded residual RL with sparse rewards 35.67%, and TD-MPC2 with a behavioral prior 31.95%.
- **Long-horizon robustness:** On T6 and T7, Kuafu reaches 87.25% and 95.21%, while no non-Kuafu learned handoff or baseline reaches 50% on either task (taskwise maxima 13.81% and 38.80%).
- **Baselines lag badly:** Eureka scored 18.24% best-train and 12.85% final-eval; VoxPoser scored 10.00% and failed completely on five tasks.
- **Cheaper in compute and tokens:** Kuafu used 122.67 GPU-hours versus 479.60 for Eureka (Eureka consumes 3.91 times Kuafu's compute). Program formation and validation cost only 0.172 hours per task. Kuafu used 110.50 thousand tokens per task on average versus 234.40 thousand for Eureka.
- **Data generation is 10.57 times faster than human teleoperation** in successful trajectory-time per active production hour (246.79 versus 23.34 minutes), and cost parity with human teleoperation is reached after 35 successful demonstrations per task on average.
- **Generated data is higher quality:** Kuafu achieves a Q95 yield of 57.3% versus 20.4% for MimicGen and 6.9% for SkillGen, with near-MPC completion times and shorter end-effector paths. Motion smoothness (SPARC) is −3.14 for Kuafu versus −4.44 for human demonstrations, −4.52 for SkillGen, and −4.67 for MimicGen.
- **Downstream visual policies improve by 23.6 percentage points** over the strongest baseline (SkillGen) with a fixed DP3 learner and 500 successful trajectories per task: 46.02% versus 22.44%. Kuafu is the only data source yielding nonzero downstream success on all nine tasks.
- **Visual policy modalities:** DP3 reaches 46.02% and ManiFlow-PC 46.46%, versus 38.52% for Diffusion Policy, 35.40% for ACT, 34.09% for ManiFlow-RGB, 26.73% for smolVLA, 21.01% for FlowPolicy, and 12.94% for MP1.
- **Multi-task VLA policies remain weak:** π0.5 reaches 20.67%, WALL-X 11.79%, and SmolVLA 2.35% when one policy covers all nine tasks.
- **Sim-to-real transfer succeeds:** Policies transfer zero-shot to physical Franka FR3 and Kinova Gen3 robots for six of the nine tasks.

## Methodology in Plain English

The input is a natural-language instruction plus videos of the objects. The agent first reconstructs simulation-ready assets from the videos and grounds them with semantic frames that expose object poses and axes. It then writes a SUN Program: an ordered list of stages, each containing relations built from a typed operator library (things like aligning an axis, moving in a direction, fixing orientation), with each relation bound to concrete scene frames.

Before any learning happens, the program is tested with model-predictive control in closed loop. A separate, rule-based success checker — written from the original instruction before the program existed and then frozen — judges whether the physical outcome actually happened. The tool returns diagnostics: which relations were unsatisfied, how large the constraint violations were, which stage failed, and whether the program falsely declared success. The agent repairs the earliest diagnosed failure and resubmits, keeping everything already validated.

Once a program is accepted, its semantics freeze. Successful MPC rollouts become the training set for a stage-conditioned behavioral-cloning policy, which replaces slow online optimization with fast learned actions while the program alone decides when to advance stages. A small, bounded residual policy is then trained on top of the frozen prior, using rewards compiled from the same program, so no new reward function has to be invented. During this phase the agent may only tune relative reward weights and the residual's scale and bound; it stops on a training success-rate drop and re-tunes. The final controller, with the program still acting as monitor and stage annotator, rolls out at scale, and only trajectories passing the independent success check are kept. Those observation-action pairs train a visual policy deployed on the real robot.

## Why This Matters

The paper argues that the recurring weakness in LLM-driven robot learning is not the language model but the loss of task semantics between tools: reward search drifts into overfitting, and imitation alone cannot recover what the controller knew. Making the task specification a single persistent, physically tested artifact — rather than something regenerated at every interface — is a cheap and general fix, and the compute numbers (122.67 versus 479.60 GPU-hours) suggest it is also the economical one.

Real-world applications:

- **Household and service robots** performing drawer opening, stacking, and object placement, which are the exact task families evaluated here.
- **Factory and warehouse manipulation**, where insertion, orientation-sensitive grasping, and precision placement recur on assembly and kitting lines.
- **Autonomous demonstration factories:** using a verified learned controller to mass-produce training data instead of paying for human teleoperation, at 10.57 times the throughput.
- **Safety-critical control interfaces (e-stop push and twist are tasks T0 and T3)**, where an independently frozen success criterion rather than the learned policy itself judges whether the outcome occurred.

Industry relevance: the pipeline offers a way to turn scarce teleoperation budgets into large, stage-labeled, quality-filtered datasets, and it produces policies that transfer zero-shot to Franka FR3 and Kinova Gen3 hardware — two widely deployed arms — without real-world fine-tuning.

## Future Directions

- **Closing the perception gap:** the state-based controller reaches 82.03% while the best point-cloud visual policies average 51.53% at per-task maxima, with the 15-stage T6 showing a 74.55-point gap. What observation encoding or memory would recover that loss is unresolved.
- **Multi-task and generalist policies:** the best single multi-task VLA in the paper reaches 20.67%, so whether SUN-style program structure can supervise one policy across many tasks is an open question.
- **Heterogeneous phase composition:** T7, which combines constrained drawer motion with orientation-sensitive grasping and a separate pick-and-place phase, produced both unrecovered formation runs and the paper's specific failure modes. Extending program repair to mixed-phase tasks is a natural next step.
- **Loosening the calibration leash:** the agent is currently forbidden from altering task semantics after acceptance and may only tune reward weights and residual bounds. Whether richer, still-safe adaptation (for example to real-world dynamics) can be permitted without reintroducing semantic drift is untested.

## Target Audience

Robotics researchers working on manipulation, learning-based control, and code-as-policy or agentic robot systems; reinforcement learning and imitation learning practitioners interested in reward specification and control-to-policy transfer; and applied engineers building data-generation pipelines or evaluating sim-to-real deployment on Franka and Kinova hardware. Readers should be comfortable with MPC, behavioral cloning, and residual RL, since the paper uses that vocabulary without extended exposition.

## Authors’ abstract

Model-based control can directly execute specified objectives, while learning can amortize such behaviors into reactive policies, making their combination a natural solution to multi-stage manipulation. We introduce Semantically UNified (SUN) Programs, typed executables that compile grounded relations into aligned optimal control objectives, satisfaction predicates, and learning rewards. Our harness, Kuafu, equips a foundation model as a task-level agent to orchestrate scene…

[The full abstract on arXiv](https://arxiv.org/abs/2608.31167)

[Read the original paper](https://arxiv.org/abs/2608.31167)

## Related papers

- [RoboEdit: Turning Human Manipulation Videos into Scalable Robot Experience](https://robotics.world/paper/roboedit-turning-human-manipulation-videos-into-scalable-robot-2608.18948) 2026-08-19 · cs.RO · Also by Chenfanfu Jiang, Demetri Terzopoulos +1
- [FetchMan: Learning Visual Humanoid Loco-Manipulation Policies from Simulated Experiences](https://robotics.world/paper/fetchman-learning-visual-humanoid-loco-manipulation-policies-from-2608.17027) 2026-08-17 · cs.RO · Also by Chenfanfu Jiang, Yuxin Jiang +1
- [BladeMaster: Real-Time Robotic Cutting Simulation with Online-Generated Persistent Discontinuities](https://robotics.world/paper/blademaster-real-time-robotic-cutting-simulation-with-online-generated-2609.27342) 2026-09-23 · cs.RO · Also by Chenfanfu Jiang
- [Skill2Real: Agentic Skill Learning for Zero-Shot Sim-to-Real Robot Manipulation](https://robotics.world/paper/skill2real-agentic-skill-learning-for-zero-shot-sim-to-real-robot-2610.02788) 2026-10-02 · cs.RO · Also by Chenfanfu Jiang
- [RACaP: Agentic Reasoning, Acting, and Coding as Policies for Evolvable Robot Learning](https://robotics.world/paper/racap-agentic-reasoning-acting-and-coding-as-policies-for-evolvable-2609.29394) 2026-09-24 · cs.RO · Key terms of the title in common

---

Canonical: https://robotics.world/paper/sun-agentic-robot-policy-learning-with-persistent-task-programs-2608.31167
