aspireai.
PUBLIC EDITION

StateMirror catches hallucinated tool calls before they run, cutting coding-agent recovery cost by 11.8%

AspireAI community · arXiv (Shiwen Shan, Yintong Huo, Zhiying Wu, Yuxu Su)
Coding agents routinely propose actions that cannot work in the environment they are actually in, calling a path that does not exist or importing a package that is not installed. A preliminary study of 4,398 agent trajectories found these mismatches are common and expensive to undo, requiring a median of 3 extra interaction steps and 22.4K tokens to recover. StateMirror intercepts actions at the harness boundary, pulls state predicates out of the AST and the command itself, and checks them deterministically against the live repository before the call executes. On 2,508 evaluated actions it reached 0.940 precision and 0.817 F1, beating the strongest LLM judge by 35.3 percent in F1 while cutting median detection latency from 17.73 seconds to 1.50 milliseconds with zero token consumption. During live mitigation across 79 tasks it reduced agent execution time by 15.8 percent and token consumption by 11.8 percent while keeping task resolution intact, and its pre-execution feedback let agents correct more than 95 percent of the hallucinated calls. The honest caveat: the detection rules are extracted from the codebase and harness configuration, so the detector's coverage is only as good as what can be statically inferred, and the evaluation is on the authors' own action set rather than an independent benchmark.
Read the story and explore more from the AspireAI community.
Discover more stories
Stay curious.
THE BIG PICTURE
A FRESH PERSPECTIVE
Research
One distance function matched sparse-autoencoder features across layers and compressed feature circuits into supernodes
Two sparse-autoencoder analyses have resisted scaling: matching semantically similar features across layers, and compressing large feature circuits into interpretable supernodes. This paper argues both are the same underlying problem, estimating semantic distances between SAE features that sit on different activation manifolds. Its representation treats each feature not as a single decoder vector but as an activation-weighted distribution over the hidden states expressing it, projects those distributions into a shared reference space, and compares them with Wasserstein distance. The representation is proved invariant to activation rescaling and stable under perturbation, and recovers true matches under finite-sample margin conditions. Empirically it outperformed decoder-vector and LLM-based baselines and captured subtle functional distinctions between related features, and it compressed large feature circuits into interpretable supernodes automatically. The limitation is that this is interpretability tooling: the paper demonstrates better feature matching and circuit compression, not that downstream interpretability claims become more accurate.
Swipe into something new
01 / 1729
The conversation continues
Explore Builds — projects by Kiran Adimatyam ↗
A fresh perspective changes everything.
ASPIREAI — STAY CURIOUS.