mlsanityData to 14 Oct 2026

Cross-Lingual Token Arbitrage: Optimizing Code Agent Context Windows via Local LLM Preprocessing

arXiv 2606.03618 ↗First posted 2 Jun 2026cs.AIcited by 1

On the map: LLM agents and tool use → General LLM agent frameworks and benchmarks

Abstract (arXiv)

AI-assisted coding agents are bottlenecked by input-token cost. Two pathologies of raw human input drive much of this overhead: tokenization inefficiency for non-English text and structural entropy in conversational prompts. Existing approaches act reactively by compressing already-bloated contexts or intervening after failures occur. We introduce a pre-flight, edge-side prompt-rewriting middleware that operates between the developer and the cloud agent. A local Llama 3.2 (3B) model performs cross-lingual translation into English, structural rewriting into a compact task-oriented format, and regex-validated rewrite-with-fallback safeguards to ensure the optimized prompt is never larger than the original. We evaluate on OMH-Polyglot, a multilingual coding benchmark spanning Turkish, Arabic, Chinese, and code-switched specifications. Across three commercial LLM backends, the middleware reduces prompt tokens by 34-47 percent and total tokens by up to 18.8 percent while preserving or improving task accuracy. Ablation studies show that gains arise primarily from the rewriting stage rather than simple function-name extraction. Compared with LLMLingua-2 at matched compression rates, our method consistently achieves superior OckScore performance across all evaluated backends. These results demonstrate that proactive prompt optimization can substantially reduce inference costs without sacrificing coding quality.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Placed in General LLM agent frameworks and benchmarks, one of 16 directions in LLM agents and tool use. Builds on 14 of its 25 references that are in the map. First posted on arXiv 2 Jun 2026.

Builds on

14 of 25 references.

References · 14

  1. 2022Large Language Models Are Human-Level Prompt Engineerscited by 1,045
  2. 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Searchcited by 653
  3. 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 367
  4. 2024LLMLingua-2: Data Distillation for Efficient and Faithful Task-Agnostic Prompt Compressioncited by 348
  5. 2023Language Model Tokenizers Introduce Unfairness Between Languagescited by 214
  6. 2025Reducing Cost of LLM Agents with Trajectory Reductioncited by 48
  7. 2024GraphCoder: Enhancing Repository-Level Code Completion via Code Context Graph-based Retrieval and Language Modelcited by 40
  8. 2025LongCodeZip: Compress Long Context for Code Language Modelscited by 39
  9. 2025COFFE: A Code Efficiency Benchmark for Code Generationcited by 20
  10. 2026Compressing Code Context for LLM-based Issue Resolutioncited by 12
  11. 2025OckBench: Measuring the Efficiency of LLM Reasoningcited by 11
  12. 2024Model Cascading for Code: A Cascaded Black-Box Multi-Model Framework for Cost-Efficient Code Completion with Self-Testingcited by 5
2 more
  1. 2025EfficientXLang: Towards Improving Token Efficiency Through Cross-Lingual Reasoningcited by 3
  2. 2026Balancing Latency and Accuracy of Code Completion via Local-Cloud Model Cascadingcited by 1

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2026Translating the Translator: Decomposing the Cost of English-Forced Inter-Agent Communication
  2. 2026Terminal-Bench-LILT: Multilingual Agentic Coding Benchmark Grounded in Language, Region, and Culture
  3. 2024CHAI for LLMs: Improving Code-Mixed Translation in Large Language Models through Reinforcement Learning with AI Feedback
  4. 2025Cross-Lingual Prompt Steerability: Towards Accurate and Robust LLM Behavior across Languages
  5. 2025LMR-BENCH: Evaluating LLM Agent's Ability on Reproducing Language Modeling Research
  6. 2026PromptResponse: Optimizing Prompts for LLM Coding Tasks
  7. 2026OLA: Output Language Alignment in Code-Switched LLM Interactions
  8. 2025RefactorCoderQA: Benchmarking LLMs for Multi-Domain Coding Question Solutions in Cloud and Edge Deployment