mlsanityData to 24 Nov 2026

Editing as Language: Teaching LLM Agents a Grammar for Native Context Editing

arXiv 2610.25550 ↗Submitted 18 Oct 2026cs.AIcited by 0

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

Abstract (arXiv)

A synopsis in novels folds a story into a few lines; a function in code gathers many steps with a single execution. Context editing is native to language itself. In this paper, we propose the Native Context Editing (NCE) framework, which gives language model agents a grammar for natively editing their own context. By encoding context-editing operations in a grammar of dedicated special tokens, we teach the agents to invoke edits through the language itself. We train agents on iteratively constructed trajectory segments, with each teacher edit conditioned on the evolving context. This establishes context editing as an atomic and inherent capability of LLM agents, enabling them to dynamically modify their context as they generate responses over long-horizon reasoning and interaction. Compared with context-editing methods that learn to generate tool-use code within specific external harness environments, our approach integrates context editing as an internal mechanism of the model's native generation process, enabling better generalization across diverse real-world workflows. On four long-horizon agentic benchmarks (Terminal-Bench 2.0, SWE-bench Verified, SWE-bench Multilingual, and SWE-bench Pro), NCE improves the average task success rate over the base model by 5.6 percentage points for LongCat-Flash-Lite-Sparse and by 4.5 for Qwen3.6-35B-A3B, while reducing average token usage by 36% and 15%, respectively.

Key facts. No citing papers in the map yet (data through 24 Nov 2026). Placed in General LLM agent frameworks and benchmarks, one of 16 directions in LLM agents and tool use. Builds on 27 of its 39 references that are in the map. Submitted 18 Oct 2026.

Builds on

27 of 39 references.

Closest ancestors · 1

Same direction, newest first

  1. 2025The Complexity Trap: Simple Observation Masking Is as Efficient as LLM Summarization for Agent Context Management29 Aug

Other references · 26

  1. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,845
  2. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 9,589
  3. 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,469
  4. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,871
  5. 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,765
  6. 2023Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflectioncited by 1,978
  7. 2023MemGPT: Towards LLMs as Operating Systemscited by 1,655
  8. 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agentscited by 1,155
  9. 2024Chameleon: Mixed-Modal Early-Fusion Foundation Modelscited by 1,003
  10. 2026Terminal-Bench: Benchmarking Agents on Hard, Realistic Tasks in Command Line Interfacescited by 742
  11. 2023LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compressioncited by 500
  12. 2024LLMLingua-2: Data Distillation for Efficient and Faithful Task-Agnostic Prompt Compressioncited by 397
14 more
  1. 2025SWE-smith: Scaling Data for Software Engineering Agentscited by 371
  2. 2025SWE-Bench Pro: Can AI Agents Solve Long-Horizon Software Engineering Tasks?cited by 363
  3. 2025MEM1: Learning to Synergize Memory and Reasoning for Efficient Long-Horizon Agentscited by 274
  4. 2025Scaling Long-Horizon LLM Agent via Context-Foldingcited by 180
  5. 2023ChatDB: Augmenting LLMs with Databases as Their Symbolic Memorycited by 148
  6. 2025AgentFold: Long-Horizon Web Agents with Proactive Context Managementcited by 120
  7. 2026OpenClaw-RL: Train Any Agent Simply by Talkingcited by 99
  8. 2025Memory as Action: Autonomous Context Curation for Long-Horizon Agentic Taskscited by 71
  9. 2025Scaling Laws for Native Multimodal Modelscited by 57
  10. 2025PENCIL: Long Thoughts with Short Memorycited by 39
  11. 2026MEMENTO: Teaching LLMs to Manage Their Own Contextcited by 25
  12. 2025Sculptor: Empowering LLMs with Cognitive Agency via Active Context Managementcited by 23
  13. 2026The Pensieve Paradigm: Stateful Language Models Mastering Their Own Contextcited by 11
  14. 2026LongCat Sparse Attention: Taming the Lightning via Streaming-aware Hierarchical Cross-Layer Indexingcited by 11

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026ContextPilot: Teaching Agents for Proactive Context Management via Fine-grained RL
  2. 2026SWE-Edit: Rethinking Code Editing for Efficient SWE-Agent
  3. 2025Agentic Context Engineering: Evolving Contexts for Self-Improving Language Models
  4. 2025PAACE: A Plan-Aware Automated Agent Context Engineering Framework
  5. 2025A Self-Improving Coding Agent
  6. 2023AgentTuning: Enabling Generalized Agent Abilities for LLMs
  7. 2025Context Engineering for Multi-Agent LLM Code Assistants Using Elicit, NotebookLM, ChatGPT, and Claude Code
  8. 2024Aligning LLM Agents by Learning Latent Preference from User Edits