TraceBound: Evaluating Trace-Bounded Context for Token-Efficient Coding Agents
Abstract
Large language model-based coding agents consume substantial tokens navigating repository codebases, yet the relationship between file access patterns and token efficiency remains underexplored. We hypothesize that restricting agent file access to execution-trace-derived allowlists could reduce token consumption by eliminating reads of irrelevant files. We introduce \textbf{TraceBound}, an inference-time framework that computes per-task file allowlists from failing test execution traces and enforces hard file-access restrictions during agent operation. Evaluating on FeatureBench Lite (30 feature development tasks) with OpenHands, we find that TraceBound \textit{increases} median input tokens by 25.72% rather than reducing them. Root cause analysis reveals that only 2.3% of file reads were denied, indicating that the agent already naturally focuses on trace-relevant files. This negative result demonstrates that modern coding agents have learned effective file navigation strategies, leaving minimal headroom for restriction-based context reduction. Notably, TraceBound improves average test pass rate by +5.76 percentage points, suggesting that explicit file-access guidance may benefit task completion even without token savings.