NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Plan-and-Patch: Diffusion Language Models for Agentic Planning

Syamantak Kumar, Jiang Guo, Hassan Hamad, Hideo Kobayashi, Yi Xiang, Yezhou Yang, Yanjun Qi, Daniele Bonadiman, Jiarong JiangarXiv 2026

TL;DR

The Plan-and-Patch framework leverages the native infilling capabilities of diffusion language models (dLLMs) to generate and repair complex agentic plans. By treating plan revision as a local "patching" problem rather than a global regeneration task, dLLMs achieve nearly double the repair success rate of autoregressive models in zero-shot settings and reduce generation latency by up to 46%.

What Problem Does This Paper Address?

In long-horizon agentic tasks—like navigating a house to find an object or following a complex crafting recipe—planning is essential but brittle. An agent might create a perfect 10-step plan, only to have step 3 fail because a door is locked or a tool returns an unexpected result.

Most current "plan-and-act" agents handle these failures by regenerating the entire plan from scratch. This is not only computationally expensive but also risky; global regeneration can introduce unnecessary changes to parts of the plan that were already valid. The authors argue that effective agents should be able to repair plans locally, preserving the valid prefix and suffix while "patching" only the failed region.

Methods

The authors introduce Plan-and-Patch, a framework that uses a single dLLM (specifically DreamReasoner-8B) for both plan generation and repair.

The Plan-and-Patch framework: A dLLM generates a plan via parallel unmasking. If execution fails, a failure detector identifies a region to "patch," which the dLLM infills while keeping the rest of the plan fixed.

Key technical components include:

  • Structured Plan Representation: Plans are serialized as a hierarchy of subgoals and executable steps (see Figure 2). This makes specific parts of the plan "addressable" for the repair process.
  • Parallel Generation: Unlike autoregressive (AR) models that generate tokens one-by-one, the dLLM generates the plan through parallel unmasking, significantly reducing latency.
  • Repair as Infilling: Because dLLMs are non-autoregressive, they naturally learn to reconstruct masked regions conditioned on both the preceding (prefix) and following (suffix) context. The framework identifies a failed region, masks it, and asks the dLLM to infill it based on environment feedback.
  • Joint Training & Block-Size Curriculum: The model is trained on both full-plan generation and partial-plan repair. The authors use a curriculum that samples different "block sizes" for masking, emphasizing short blocks for generation (to ensure structure) and larger blocks for repair (to allow for flexible infilling).
Figure 2: A TextCraft plan and its ordered hierarchy. All five executable steps are shown; reasoning is elided. Arrows show containment; execution visits leaves in depth-first, left-to-right order.

Datasets

The framework was evaluated on three distinct benchmarks:

  1. ALFWorld: A synthetic environment for household navigation and manipulation tasks.
  2. TextCraft: A dependency-based crafting game (similar to Minecraft) that requires complex sub-goal coordination.
  3. Natural Plan: A benchmark for travel and scheduling tasks used here for zero-shot (no task-specific training) evaluation.
  4. ScienceWorld: Used in the appendix to test performance on extremely long-horizon tasks.

Key Insights and Ideas

  • Infilling is a "Superpower" for Repair: Autoregressive models struggle with infilling because they are trained to look only at the past. While "Fill-In-the-Middle" (FIM) training can help AR models, dLLMs are fundamentally built for bidirectional context, making them much more robust at generating a patch that fits perfectly between an existing prefix and suffix.
  • Parallelism Equals Speed: By unmasking multiple tokens per forward pass, dLLMs bypass the "one-token-at-a-time" bottleneck of AR models, which is particularly valuable for long, structured plans.
  • The Importance of Region Selection: The paper highlights that where you choose to patch is as important as how you patch. Using execution history to select the repair region is a significant challenge; if the failure detector picks the wrong steps to revise, the repair is doomed regardless of the model's quality.

Key Results

  • Latency: Diffusion models reduced mean plan-generation latency by 39–46% compared to the AR baseline (Qwen3-8B).
  • Zero-Shot Repair: On the Natural Plan benchmark, the diffusion model achieved a 53.7% repair success rate, nearly doubling the 27.0% achieved by the AR model.
  • Fine-Tuned Performance: After task-specific training on ALFWorld and TextCraft, both diffusion and AR models achieved similar overall success rates (around 44-45% for ALFWorld and 63-66% for TextCraft), but the diffusion model maintained its significant speed advantage.
  • Format Sensitivity: The authors found that "prose" plans (numbered steps) actually improved generation success over highly "delimited" plans (XML-like tags), though the delimited format was better for precise region selection during repair.

Limitations and Future Work

  • Long-Horizon Scaling: In ScienceWorld (very long plans), the dLLM's performance degraded more sharply than the AR model's, often failing to close the plan hierarchy or falling into repetitive loops.
  • Failure Detection: The current framework often relies on an external "judge" or a separate executor prompt to identify the failure region. Integrating the failure detection and region selection directly into the dLLM's training is a suggested next step.
  • Global Consistency: While local patching is efficient, there is a risk that a local fix might conflict with a global goal established much earlier or later in the plan. Future work could explore "multi-scale" repair.

Summary updated

BibTeX
@misc{kumar2026plan,
  author = {Syamantak Kumar and Jiang Guo and Hassan Hamad and Hideo Kobayashi and Yi Xiang and Yezhou Yang and Yanjun Qi and Daniele Bonadiman and Jiarong Jiang},
  title = {{Plan-and-Patch: Diffusion Language Models for Agentic Planning}},
  year = {2026},
  eprint = {2610.10786},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.10786},
}
Figure