Skip to content

SAFARI: Scaling Long Horizon Agentic Fault Attribution via Active Investigation

๐Ÿ•’ Published (v1): 2026-06-23 14:23 UTC ยท Source: Arxiv ยท Venue: ICML 2026 ยท link

Why this paper was selected

ICML 2026; fault attribution for long-horizon multi-agent failures beyond context window

Ask a follow-up

Open an assistant pre-loaded with this paper's context.

๐Ÿ’ฌ Ask ChatGPTโœฆ Ask Claude

TL;DR

SAFARI is a tool-augmented diagnostic framework that replaces passive full-trajectory loading with an iterative, hypothesis-driven Active Investigation loop to localize faults in long-horizon multi-agent system traces. It decouples diagnostic accuracy from context window size by equipping an Investigator Agent with read and search tools plus a persistent Short-Term Memory (STM). On constrained budgets, SAFARI outperforms state-of-the-art by 19โ€“20% and maintains 0.58 precision even when the target fault lies 5ร— beyond the model's native context limit.

Problem

Multi-agent LLM systems produce execution trajectories that routinely exceed even 1M-token context windows (TRAIL traces reach 2M+ tokens). Existing fault attribution methods โ€” one-shot prompting, step-by-step scanning, and iterative reasoning (RAFFLES) โ€” all passively ingest trajectories, causing catastrophic attention dilution and outright failure (\(\varsigma = \text{Pos}_\text{info} / \text{Len}_\text{context} > 1\)). There is no method that can reliably isolate a decisive fault when it resides beyond addressable memory.

Method

SAFARI frames fault attribution as an iterative investigation over a trajectory \(\tau = \{\tau_1, \dots, \tau_T\}\) using an Investigator Agent that never loads the full trace:

  1. Tool-augmented navigation: Two tools โ€” read(offset, limit) for sequential log scrolling and search(pattern) for regex jumps โ€” allow targeted, non-linear access to trajectory segments.
  2. Short-Term Memory (STM): A persistent block appended to every LLM call containing: task goal, current hypothesis + evidence, investigative gaps/plans, and past tool calls. When conversation history \(H_k\) is evicted by context overflow, the STM preserves diagnostic intent.
  3. Atomic Reasoning Evaluator: Before concluding, the Investigator decomposes its hypothesis into up to \(E=3\) atomic claims \(b_i\) with evidence. A parallel Reasoning Evaluator LLM (which never sees the raw trace) assigns a confidence score per claim. If average confidence \(\bar{C} \geq \theta\) (default 70), the agent outputs the decisive fault \(t'\); otherwise low-scoring claims trigger further tool calls.
  4. Forced finalization: If the iteration budget \(K=30\) is exhausted, the agent synthesizes a best answer from \(H_K\).

The scaling factor \(\varsigma = \text{Pos}_\text{info} / \text{Len}_\text{context}\) formalizes the challenge; SAFARI targets \(\varsigma \geq 1\) regimes.

Key Contributions

  • Active Investigation loop that replaces linear context loading with selective, tool-driven trajectory querying.
  • Short-Term Memory module acting as a logical anchor across turns, preserving hypotheses and investigative plans beyond context eviction.
  • Atomic Reasoning Evaluator providing falsifiable claim verification decoupled from raw trace access.
  • Scaling factor \(\varsigma\) as a formal metric to benchmark fault attribution under context-constrained and context-exceeding regimes.
  • Evaluations on two complementary benchmarks (Who&When and TRAIL) spanning traces from 3.3k to 2.2M tokens.

Results

  • TRAIL/GAIA (25K token budget): SAFARI precision 0.556, strict precision 0.504 vs. RAFFLES 0.521/0.419 โ€” +7% precision, +19% strict precision.
  • Who&When Hand-crafted (1M token budget): SAFARI ยฑ5-step accuracy 0.569 vs. RAFFLES 0.466 โ€” +20% improvement.
  • Fixed scaling factor (\(\varsigma = 5\), TRAIL/GAIA): SAFARI maintains 0.58 precision; one-shot and RAFFLES score 0 (fault outside addressable window).
  • SAFARI at 100K tokens โ‰ˆ RAFFLES at 1M tokens on TRAIL/GAIA (0.615 vs. 0.615 precision).
  • At full 1M budget where traces fit in context, SAFARI performs slightly below RAFFLES on TRAIL/GAIA (0.590 vs. 0.615), as STM summarization incurs information loss when raw logs are fully addressable.
  • STM ablation: removing STM drops SAFARI precision by 2โ€“4% on GAIA across budgets; effect is most pronounced at 100K on SWE-Bench (0.355 โ†’ 0.258 without STM).
  • Backbone: Claude-Opus-4.6 (1M token) for all experiments.

Limitations

  • STM summarization trades recall for compression; at high token budgets, raw logs outperform selective STM, and conflicting information between raw history and STM is unresolved.
  • Code-heavy traces (SWE-Bench) are harder to condense into STM than general-purpose traces; SAFARI degrades more steeply on TRAIL/SWE at \(\varsigma > 1\).
  • Higher latency than baselines in low-budget regimes (267s vs. 66s at 25K for TRAIL/GAIA) due to iterative tool calling.
  • 90% of ground-truth faults in existing benchmarks occur within the first 200K tokens (\(\varsigma \approx 0.2\)), limiting naturalistic evaluation of extreme-\(\varsigma\) regimes; authors construct synthetic \(\varsigma\) evaluations as a proxy.
  • Evaluation uses only Claude-Opus-4.6; generalization to other LLMs not demonstrated.
  • GAIA ground truth may be memorized in LLM pretraining; private datasets needed for uncontaminated fault attribution evaluation.

Relevance to Agentic AI / LLM Agents

SAFARI directly addresses a critical reliability gap in production multi-agent systems: as agent pipelines scale to hundreds of steps and millions of tokens, diagnosing failures becomes intractable for any passive evaluator. The Active Investigation paradigm โ€” equipping an LLM with targeted retrieval tools rather than forcing full-context ingestion โ€” is a broadly applicable design pattern relevant to any long-horizon agent debugging, monitoring, or self-repair system. The formal \(\varsigma\) metric and the STM architecture generalize beyond fault attribution to any agent task requiring coherent reasoning over trajectories that exceed context limits. This work connects directly to the emerging subfield of agent observability and the challenge of building reliable, self-diagnosing multi-agent pipelines.