SAFARI Scales Agentic Fault Attribution Beyond Context Limits

Chenyang Zhu, Jiayu Yao, Kushal Chawla, Youbing Yin, Nathan Wolfe, Pengshan Cai, Jingyu Wu, Spencer Hong, Sangwoo Cho, Shi-Xiong Zhang, Daben Liu, Sambit Sahu, Erin Babinsky· June 24, 2026 View original

Summary

This paper introduces SAFARI, a framework that scales long-horizon agentic fault attribution by replacing linear context loading with a tool-augmented diagnostic loop. It equips LLMs with a specialized toolbox and persistent Short-Term Memory, allowing diagnosis of faults far beyond native context window limits.

As autonomous agents tackle increasingly complex, multi-step tasks, their execution trajectories often grow too large for even the most extensive LLM context windows. Traditional fault diagnosis methods, which load the entire trajectory into an LLM's context, suffer from attention dilution and fail when traces exceed these limits. To overcome this, researchers developed SAFARI (Scaling long-horizon Agentic Fault AttRibution via active Investigation). SAFARI fundamentally changes the diagnostic approach by replacing linear context loading with an intelligent, tool-augmented diagnostic loop. This framework provides LLMs with a specialized toolbox to read and search specific segments of a trajectory. Crucially, SAFARI also incorporates a persistent Short-Term Memory (STM) for cross-turn reasoning, allowing the LLM to maintain context and diagnose faults even when they occur far beyond its native context window. Experiments show SAFARI significantly outperforms state-of-the-art methods, maintaining high precision even when faults are 5x beyond the model's architectural context limits, a scenario where other evaluators completely fail.

Why it matters

SAFARI provides a critical solution for debugging and understanding failures in complex, long-running autonomous AI systems, enabling developers to build more reliable and robust agents by overcoming context window limitations.

How to implement this in your domain

  1. 1Assess current debugging strategies for autonomous agents, especially for long-horizon tasks.
  2. 2Explore integrating SAFARI's tool-augmented diagnostic loop to overcome LLM context window limitations.
  3. 3Equip LLMs with specialized tools for reading and searching agent trajectory segments.
  4. 4Implement a persistent Short-Term Memory (STM) for cross-turn reasoning in fault attribution.
  5. 5Apply SAFARI to improve the reliability and debuggability of complex multi-step, multi-agent systems.

Who benefits

Autonomous VehiclesRoboticsSoftware DevelopmentAerospaceCybersecurity

Key takeaways

  • Traditional fault diagnosis for long agent trajectories is limited by LLM context windows.
  • SAFARI uses a tool-augmented diagnostic loop and persistent Short-Term Memory.
  • It enables fault attribution far beyond native context limits, improving precision.
  • This framework is crucial for building more reliable and robust autonomous AI systems.

Original post by Chenyang Zhu, Jiayu Yao, Kushal Chawla, Youbing Yin, Nathan Wolfe, Pengshan Cai, Jingyu Wu, Spencer Hong, Sangwoo Cho, Shi-Xiong Zhang, Daben Liu, Sambit Sahu, Erin Babinsky

"arXiv:2606.24626v1 Announce Type: new Abstract: As autonomous agents tackle increasingly complex multi-step, multi-agent tasks, their execution trajectories have scaled beyond the constraints of even the largest context windows. Current methods for effectively diagnosing agent fa…"

View on X

Originally posted by Chenyang Zhu, Jiayu Yao, Kushal Chawla, Youbing Yin, Nathan Wolfe, Pengshan Cai, Jingyu Wu, Spencer Hong, Sangwoo Cho, Shi-Xiong Zhang, Daben Liu, Sambit Sahu, Erin Babinsky on X · view source

Want to go deeper?

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

Explore courses