Query-Conditioned Reuse Improves AI Agent's Long-Horizon Task Performance

Yifei Li, Heng Wang, Lingling Zhang, Muye Huang, Xinyu Zhang, Jiashuai Liu, Hang Yan, Rongman Xu· August 14, 2026 View original

Key takeaways

  • Query-Conditioned Reuse (QCR) improves AI agents' ability to adapt past experiences to new tasks.
  • QCR uses target-bound notes to specify reusable procedures and applicability conditions.
  • It significantly boosts task success rates and reduces token usage compared to full trajectory injection.
  • The method is particularly effective for longer tasks or when conditions change between source and target.

Who benefits

RoboticsSoftware DevelopmentCustomer ServiceAutomationGaming

Summary

This research introduces Query-Conditioned Reuse (QCR), a method that enhances AI agents' ability to reuse past long-horizon trajectories by providing target-bound notes that specify reusable procedures and applicability conditions. QCR significantly improves task success rates and reduces token usage compared to direct trajectory injection, especially for longer or modified tasks.

The challenge of reusing past AI agent trajectories, particularly for long-horizon tasks where conditions might change, has been identified as a significant bottleneck. While retrieval can identify relevant past experiences, it doesn't specify how an agent should adapt that experience when user inputs, entities, constraints, or environment states are different. This paper proposes a distinct "post-retrieval reuse" step and an evaluation framework to address this. The researchers introduce Query-Conditioned Reuse (QCR), a simple yet effective method that provides agents with target-bound notes. These notes record reusable procedures, necessary bindings, applicability conditions, and verification requirements. QCR aims to test the hypothesis that structured, context-aware support for reuse is more effective than simply injecting full past trajectories. Evaluations across 2,391 target instances in complex environments like WebArena, WorkArena, and AppWorld showed QCR achieving an average success rate of 62.3%, a 10.7 percentage point improvement over using full trajectories, while consuming 48.9% fewer online tokens. Analysis revealed that direct trajectory injection loses utility as tasks become longer or require significant adaptation, whereas QCR maintains its effectiveness. This framework successfully separates the quality of retrieval from the crucial problem of converting retrieved experience into actionable, safe support for new tasks.

Why it matters

This research offers a practical approach to making AI agents more adaptable and efficient in complex, long-running tasks by improving how they learn from and reuse past experiences. Professionals can leverage these insights to build more robust and less resource-intensive autonomous systems.

How to implement this in your domain

  1. 1Design agent memory systems to store query-conditioned reusable procedures rather than just raw trajectories.
  2. 2Implement mechanisms for agents to generate and interpret "target-bound notes" for future task reuse.
  3. 3Develop evaluation metrics that specifically assess the "post-retrieval reuse" phase of agent operation.
  4. 4Apply QCR principles to reduce token usage and improve success rates in long-horizon AI agent applications.

Original post by Yifei Li, Heng Wang, Lingling Zhang, Muye Huang, Xinyu Zhang, Jiashuai Liu, Hang Yan, Rongman Xu

"arXiv:2608.12847v1 Announce Type: new Abstract: Retrieval can identify a past trajectory that may matter, yet it does not specify how an acting agent should use that trajectory after users, entities, constraints, or environment state have changed. We identify this post-retrieval…"

View on X

Originally posted by Yifei Li, Heng Wang, Lingling Zhang, Muye Huang, Xinyu Zhang, Jiashuai Liu, Hang Yan, Rongman Xu on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses

More in AI Engineering & DevTools