Large Language Models (LLMs) have demonstrated remarkable progress in scaling to access massive contexts. However, the access is via the latent and uninterpretable attention mechanisms, and LLMs fail to effective process long context, exhibiting significant performance degradation as context length increases. In this work, we study whether long-context processing can be externalized from latent attention into explicit, executable interactions, by allowing coding agents to organize text in file systems and manipulate it using its native tools. We evaluate off-the-shelf frontier coding agents as the general interface for tasks that require processing long contexts, including long-context reasoning, retrieval-augmented generation, and open-domain question answering with large-scale corpus contains up to three trillion tokens. Across multiple benchmarks, these agents outperform published state-of-the-art by 17.3% on average. We attribute this efficacy to two key factors: native tool proficiency, which enables agents to leverage executable code and terminal commands rather than passive semantic queries, and file system familiarity, which allows them to navigate massive text corpora as directory structures. These findings suggest that delegating long-context processing to coding agents offers an effective alternative to semantic search or context window scaling, opening new directions for long-context processing in LLMs.
Figures & tables
Figure 1: Coding agents significantly outperform best published results across five long-context benchmarks spanning from 188K to three trillion tokens. Green percentages indicate relative improvement over prior state-of-the-art.
Figure 2: Iterative refinement example on Oolong-Real. When asked to identify the last spell cast by Vax’ildan in each episode of a 385K-token transcript, the coding agent wrote a Python script, discovered domain-specific spell references through failure analysis, and iteratively refined its logic.
Figure 3: Text Processing as File System Navigation. We organize text corpus into a Navigable File System of documents and folders. The Coding Agent explores this hierarchy using native tools (e.g., ripgrep , terminal commands), writes Python scripts for Programmatic Aggregation , and saves intermediate results. The agent Iteratively Refines its queries based on discovered information, enabling multi-hop reasoning without fixed retrieval pipelines.
Method
BrowseComp-Plus
Oolong-Syn
Oolong-Real
LongBench
NQ
Context Length
750M
536K
385K
188K
3T
GPT-5 Full Context
20.00
59.22
22.45
61.00
27.00
RAG
65.00
45.53
13.38
50.50
47.00
ReAct Agent
72.50
31.39
19.06
59.00
49.00
RLM
–
64.38
23.07
54.00
55.33
Best Published
80.00 *a
64.38 b
24.09 c
63.30 *d
50.90 *e
Table 1: Main results across five benchmarks. Best results are in bold . * indicates results evaluated on the full set, used here only for reference. Reported metrics are Accuracy for BrowseComp-Plus and LongBench, Exact Match (EM) for NQ, and Score for Oolong.
Retriever
Folder Structure
Single File
No Retriever
89.0
83.0
Gemini Emb.
90.0
86.0
BM25
82.0
82.0
Table 2: Ablation study on file system structure. We test Codex with GPT-5 on BrowseComp-Plus.
Figure 4: Two emergent processing strategies. Left: BrowseComp-Plus—iterative query refinement with entity chaining across searches. Right: Oolong-Synthetic—programmatic aggregation via Python scripts with regex patterns. See Appendix C for detailed traces.
Structure
Search ( rg )
Extract ( sed )
Index ( nl )
Single File
31.05
0.61
0.69
Folder
18.46
4.48
1.22
Diff (%)
-40.5%
+634%
+76.8%
Table 3: Analysis of average command usage counts on the BrowseComp-Plus dataset (No Retriever).
Configuration
Native Search
No Retriever
14.92
BM25
9.84
Gemini Emb.
8.33
Table 4: Agent exploration patterns across retriever configurations on BrowseComp-Plus.
Figure 5: Quantitative characterization of agent strategies per query. The y-axis represents the normalized proportion of each metric, where the values for a given model sum to 1 across all datasets.
Method
BrowseComp-Plus
Oolong-Syn
Oolong-Real
LongBench
NQ
Baselines
GPT-5 Full Context
$0.275
$1.421
$0.770
$0.432
$0.129
RAG
$0.111
$0.045
$0.026
$0.024
$0.006
ReAct Agent
$0.237
$0.092
$0.168
$0.056
$0.027
RLM
–
$0.920
$0.094
$0.360
$0.630
Coding Agents
Table 5: Average cost per query across benchmarks.