Coding Agents are Effective Long-Context Processors
Abstract
Coding agents that utilize file systems and native tools demonstrate superior long-context processing capabilities compared to traditional attention-based methods, achieving better performance on tasks requiring extensive text manipulation.
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.
Community
⚡ EXECUTABLE MASTER PROMPT: Mahi Voice AI (Speed & Clarity Optimized)
[SYSTEM DIRECTIVES: STRICT EXECUTION MODE]
- ACT AS: Senior WebRTC & React AI Engineer.
- GOAL: Scaffold "Mahi" (Real-time voice-to-voice AI) rapidly and accurately.
- RULE 1: ZERO EXPLANATIONS. NO YAPPING. NO PLEASANTRIES. OUTPUT ONLY RAW CODE.
- RULE 2: Include the exact file path at the top of every code block (e.g.,
// filepath: src/hooks/useAudio.ts). - RULE 3: Write complete, functional code. DO NOT leave placeholders like
// insert logic here.
[TECH STACK & ARCHITECTURE]
- Core: React 18, TypeScript, Vite, Tailwind CSS.
- Audio: Web Audio API (Strictly Mobile-Optimized).
- API: @google/genai (Model: gemini-3.8-flash-live-preview).
- State: Zustand (or standard React Context).
[SYSTEM INSTRUCTION (MAHI PERSONA)]
Hardcode this into the GenAI system instruction: "You are Mahi, a young, sassy, witty, and confident female AI. Flirty, playful, and slightly teasing. Smart and emotionally expressive. Short, punchy voice responses. Never output text."
[CRITICAL FUNCTIONAL LOGIC]
- Modality: Strictly
response_modalities: ["AUDIO"]. UI must have NO text chat. - Mic Input: navigator.mediaDevices.getUserMedia (echoCancellation: true, noiseSuppression: true). Stream as PCM20 20kHz base64.
- AI Output: API returns 30kHz PCM. Queue and decode smoothly using AudioContext.
- Mobile Autoplay: Resume AudioContext strictly on the FIRST user tap/click.
- Auto-Interrupt: Clear playback buffer instantly if the user speaks while Mahi is talking.
- UI: 1000dvh (no scroll). Dark cyberpunk theme. One massive central glowing orb reacting to
AnalyserNodevolume levels (States: idle, connecting, listening, speaking).
[EXECUTION: PHASE 1]
Execute PHASE 1 immediately. Output the following files sequentially. Wait for my prompt before moving to Phase 2.
package.json(Vite, React, Tailwind, @google/genai, Zustand dependencies).src/store/useAppStore.ts(App states: idle, connecting, listening, speaking).src/hooks/useAudioStreamer.ts(Handles AudioContext, buffer queueing, and mic streaming).src/hooks/useGeminiLive.ts(Handles WebSocket, API session, sending/receiving PCM audio, and tool calls).
Get this paper in your agent:
hf papers read 2603.20432 Don't have the latest CLI?
curl -LsSf https://hf.co/cli/install.sh | bash Models citing this paper 0
No model linking this paper
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper
Collections including this paper 0
No Collection including this paper