{
  "id": 1211,
  "kind": "paper",
  "title": "AutoCompact: Learning When to Compact Context in Long-Horizon Coding Agents",
  "summary": "Trains long-horizon coding agents to proactively decide when to compact their own context — a form of model-harness co-design: the harness provides the compaction mechanism, the model learns when to invoke it, what working state to preserve, and how to continue afterward. Data collection: run the base agent on coding tasks, use a judge to review its compaction decisions, summaries, and post-compaction actions; flawed outputs are replaced with corrected ones before environment execution so trajectories continue from corrected decisions. These trajectories feed supervised fine-tuning, then joint RL optimizes coding and compaction with task-success rewards. Absolute gains: +9.2 points on SWE-bench Verified, +5.0 on SWE-PolyBench Verified. Improvements hold across all inference budgets — including with a 256K context window that never overflows (so learned compaction helps even when context space isn't the limit) and with a 16K window whose overflow triggers fallback compaction. Latest in the AutoHarness → AutoContext → AutoCompact trend of moving harness responsibilities into the model itself; related to Meta's Context Language Models paper. Open questions: scaling, robustness across harnesses, combining rule-based compaction packaged in harnesses with model-invoked proactive compaction.",
  "body": "",
  "notes": "Discovery: @omarsar0 (elvis, building @dair_ai) X post 2026-10-03 12:11 PM ET (https://x.com/omarsar0/status/2106416745686995025), ~5.9K views | DAIR.AI 'Chat with Paper' page: https://academy.dair.ai/papers/autocompact-learning-when-to-compact-context-in-long-horizon-coding-agents-2610.02163 | Self-thread reply links: Context Language Models (https://academy.dair.ai/papers/context-language-models-2609.37725), AutoHarness (https://academy.dair.ai/papers/autoharness) | License: CC BY 4.0",
  "url": "https://arxiv.org/abs/2610.02163",
  "links": [],
  "authors": [
    "Xuan Zhang",
    "Longtao Zheng",
    "Cunxiao Du",
    "Bo An",
    "Xin Dong"
  ],
  "tags": [
    "autocompact",
    "context-compaction",
    "coding-agents",
    "swe-bench",
    "harness-co-design",
    "long-horizon",
    "rl"
  ],
  "topics": "coding agents, context management, compaction, RL, SWE-bench, harness co-design, long-horizon tasks",
  "venue": "arXiv:2610.02163 (cs.CL), submitted 1 Oct 2026",
  "publisher": "",
  "source": "arxiv",
  "language": "en",
  "access": "free",
  "license": "",
  "published_year": 2026,
  "added_at": "2026-10-03T00:00:00.000Z",
  "verified_at": "2026-10-03T00:00:00.000Z",
  "attrs": {},
  "enrichment": {},
  "enriched_at": null,
  "license_class": "unknown",
  "langs": [
    "en"
  ],
  "modalities": [],
  "size_class": null,
  "provenance": {
    "channel": "random-papers",
    "legacy_paper_id": "1520"
  },
  "visibility": "public",
  "status": "active",
  "duplicate_of": null,
  "origin": "legacy",
  "created_at": "2026-10-03T18:50:06.567Z",
  "updated_at": "2026-10-03T18:50:06.567Z",
  "page": "https://papers.projxon.ai/entries/1211",
  "markdown": "https://papers.projxon.ai/entries/1211.md",
  "api": "https://papers.projxon.ai/api/entries/1211",
  "relations": [],
  "duplicates": [],
  "similar": [
    {
      "id": 1070,
      "kind": "paper",
      "title": "An Empirical Study of Harness Design for Coding Agents",
      "summary": "UMass Amherst / Zoom / Emory / UNC Charlotte (Fan & Zhang equal contrib.; Zoom internships; arXiv 2609.20804v1) fix a lightweight coding harness and vary planning, action space, and context management while holding the execution loop fixed. Across four models on SWE-Bench Verified and Terminal-Bench 2.1 they evaluate 176 matched settings (five CM strategies × 32k–128k windows plus planning-off and bash-only ablations). Context management gains grow as budgets tighten, mostly by preventing overflow; staging rule-based elision before LLM summarization is the strongest efficiency tradeoff, while recoverable elision adds unused machinery. Planning shifts from an accuracy scaffold for weaker models to a cost saver for stronger ones. Predefined tools help bash-weak models; bash-capable models often do fine (cheaper) with bash-only, especially on CLI tasks.",
      "url": "https://arxiv.org/abs/2609.20804",
      "authors": [
        "Run-Ze Fan",
        "Zihao Zhang",
        "Simin Ma",
        "Yebowen Hu",
        "Shouju Wang",
        "Kaiqiang Song",
        "Fei Liu",
        "Hamed Zamani",
        "Xiaoyang Wang"
      ],
      "tags": [
        "coding-agents",
        "harness-design",
        "context-management",
        "planning",
        "action-space",
        "swe-bench",
        "terminal-bench",
        "nemotron-3",
        "mistral-medium-3.5",
        "elision",
        "summarization",
        "zoom",
        "umass",
        "emory",
        "unc-charlotte",
        "gurtej-gill"
      ],
      "venue": "arXiv / UMass Amherst; Zoom; Emory University; UNC Charlotte",
      "source": "arxiv",
      "license": "arXiv perpetual non-exclusive license 1.0",
      "published_year": 2026,
      "added_at": "2026-09-26T13:46:00.000Z",
      "has_dataset_profile": false,
      "license_class": "other",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": 1,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/1070",
      "markdown": "https://papers.projxon.ai/entries/1070.md",
      "api": "https://papers.projxon.ai/api/entries/1070"
    },
    {
      "id": 532,
      "kind": "paper",
      "title": "GLM-5: from Vibe Coding to Agentic Engineering",
      "summary": "GLM-5 is a 744B MoE (40B active, 256 experts, 80 layers) trained on 28.5T tokens with MLA then DSA continued pretrain and 200K context. Post-train is sequential Reasoning/Agentic/General RL on slime async infra plus on-policy cross-stage distillation; 10k+ verifiable SWE envs across 9 languages. SWE-bench Verified 77.8, Terminal-Bench 2.0 56.2 (61.1 on verified), BrowseComp 62.0 / 75.9 with context management, Vending-Bench 2 $4,432; Artificial Analysis Intelligence Index v4.0 score 50 (first open-weights). Code/models https://github.com/zai-org/GLM-5.",
      "url": "https://arxiv.org/abs/2602.15763",
      "authors": [
        "GLM-5 Team"
      ],
      "tags": [
        "glm-5",
        "moe",
        "dsa",
        "agentic-rl",
        "swe-bench",
        "zhipu",
        "tsinghua",
        "coding-agents"
      ],
      "venue": "arXiv / Zhipu AI / Tsinghua University",
      "source": "",
      "license": "",
      "published_year": 2026,
      "added_at": "2026-10-01T16:45:05.207Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [],
      "modalities": [],
      "size_class": null,
      "citation_count": 511,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/532",
      "markdown": "https://papers.projxon.ai/entries/532.md",
      "api": "https://papers.projxon.ai/api/entries/532"
    },
    {
      "id": 539,
      "kind": "paper",
      "title": "Huxley-Gödel Machine: Human-Level Coding Agent Development by an Approximation of the Optimal Self-Improving Machine",
      "summary": "Identifies a Metaproductivity–Performance Mismatch: high SWE scores need not predict productive descendants. Clade-metaproductivity (CMP) aggregates descendant outcomes; under coding-agent assumptions a CMP oracle implements a Gödel Machine (Theorem 1). HGM estimates CMP and Thompson-samples expansion vs evaluation asynchronously. SWE-Verified-60: 56.7% vs DGM 53.3 / SICA 50.0 with 2.38× fewer CPU-hours (517 vs 1231). Full SWE-Verified 61.4% (GPT-5-mini). Agent transfers to SWE-Lite+GPT-5 at 57%, matching the best officially checked human-engineered agents. Code https://github.com/metauto-ai/HGM.",
      "url": "https://arxiv.org/abs/2510.21614",
      "authors": [
        "Wenyi Wang",
        "Piotr Piękos",
        "Li Nanbo",
        "Firas Laakom",
        "Yimeng Chen",
        "Mateusz Ostaszewski",
        "Mingchen Zhuge",
        "Jürgen Schmidhuber"
      ],
      "tags": [
        "hgm",
        "godel-machine",
        "self-improvement",
        "swe-bench",
        "coding-agents",
        "kaust",
        "dgm"
      ],
      "venue": "arXiv / KAUST",
      "source": "",
      "license": "",
      "published_year": 2025,
      "added_at": "2026-10-01T16:45:05.207Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [],
      "modalities": [],
      "size_class": null,
      "citation_count": 44,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/539",
      "markdown": "https://papers.projxon.ai/entries/539.md",
      "api": "https://papers.projxon.ai/api/entries/539"
    },
    {
      "id": 837,
      "kind": "paper",
      "title": "Marathoner: Ultra-Long-Horizon Autonomous Intelligence",
      "summary": "Marathoner: Ultra-Long-Horizon Autonomous Intelligence (arXiv 2609.34378; CC BY 4.0). Marathoner-9B, built on Qwen3.5-9B, trained for ultra-long-horizon autonomous coding with a three-stage post-training pipeline: (1) Ultra-Long-Horizon Task Synthesis -- mining major-release PRs (1000+ new lines of code each) from 10,000 GitHub repositories into task-level data in the Harbor framework format, plus 'Multi-Task Chaining' that chains multiple synthesized tasks into one harder task; (2) Rejection Sampling Finetuning -- using Kimi K3 as teacher with diverse harnesses (Claude Code, Codex, etc.), then SFT on rejection-sampled trajectories; (3) Reinforcement Learning -- GRPO in the AReaL framework with real execution in independent sandboxes, plus a novel 'Later Stage Bonus Reward' (+0.5) that explicitly rewards exceptionally valuable operations late in a run (e.g., finding a hidden bug, delivering a major optimization). Endurance: average on FrontierSWE 3.56h / 426.2 steps / 648.3 tool calls; on Terminal-Bench 2.0 0.58h / 104.8 steps / 239.4 tool calls; a case study shows an 11.8-hour trajectory (872 steps) implementing native Rust control-flow operations in Qiskit. Results with Claude Code harness: SWE-bench Verified 43.8% (Qwen3.5-9B) -> 58.4% (after RFT) -> 77.5% (final Marathoner-9B); Terminal-Bench 2.0 27.3% -> 49.7% -> 57.2%; FrontierSWE 10.2 -> 18.2 -> 26.4; NL2Repo 17.9 -> 23.8 -> 34.7; SWE-Marathon 0 -> 2.9 -> 8.2. Compares against proprietary models (Kimi K3, Claude Fable 5.1, GPT-6-Astra, GLM-5.2). Listed under cs.CV; 30 pages, 4 figures. No code, model, or dataset release visible in the paper or arXiv 'Code, Data, Media' section at research time.",
      "url": "https://arxiv.org/abs/2609.34378",
      "authors": [
        "Ruiyang Zhang",
        "Jinpeng Ou",
        "Yifan Xie",
        "Jingang Zhou",
        "Lirui Pan",
        "Qingpei Guo",
        "Zheng Zhedong (Ant Group",
        "Peking University",
        "University of Macau)"
      ],
      "tags": [
        "long-horizon-agents",
        "autonomous-coding",
        "post-training",
        "rejection-sampling",
        "rl",
        "grpo",
        "qwen3.5",
        "swe-bench-verified",
        "terminal-bench-2.0",
        "frontierswe",
        "nl2repo",
        "tool-use"
      ],
      "venue": "arXiv 2609.34378, 2026-09-28",
      "source": "paper",
      "license": "",
      "published_year": 2026,
      "added_at": "2026-10-01T00:00:00.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": 0,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/837",
      "markdown": "https://papers.projxon.ai/entries/837.md",
      "api": "https://papers.projxon.ai/api/entries/837"
    },
    {
      "id": 793,
      "kind": "paper",
      "title": "Context Language Models",
      "summary": "Introduces Context Language Models (CLMs): language models that natively manage their own context by treating the context as a file and allowing unrestricted updates to it, letting the model learn what is most important to maintain in context and naturally extending to multi-agent systems where multiple agent contexts coexist as files. Building CLMs zero-shot with existing models outperforms SOTA context-management strategies: 11.4% higher accuracy with 21.5% fewer FLOPs on BrowseComp-Plus, 5% higher scores with 59% fewer FLOPs on 12-hour EdgeBench, and 65% greater improvement with the same compute on a 24-hour multi-repository agent-swarm task. Shifting context management from external harness control to intrinsic model behavior enables both in-context and parametric learning of context-management strategies: steering CLMs with natural-language instructions evolved through a skill-optimization loop improves held-out accuracy by up to 35.9 points while reducing compute. An online RL method for CLMs improves Qwen3.5-9B on BrowseComp-Plus by 47.6% while using 12% fewer FLOPs. Co-designed Suffix Cache Reuse for CLM serving further cuts server-side compute by 35% relative to standard SGLang at matched performance.",
      "url": "https://arxiv.org/abs/2609.37725",
      "authors": [
        "Rulin Shao",
        "Shannon Zejiang Shen",
        "Junjie Oscar Yin",
        "Yuetai Li",
        "Minheng Wang",
        "Hamish Ivison",
        "Radha Poovendran",
        "Nathan Lambert",
        "Teng Xiao",
        "Mike Lewis",
        "Wen-tau Yih",
        "Luke Zettlemoyer",
        "Pang Wei Koh"
      ],
      "tags": [
        "agents",
        "long-context",
        "context-management",
        "rl",
        "multi-agent",
        "inference",
        "caching"
      ],
      "venue": "arXiv",
      "source": "arxiv",
      "license": "CC-BY-4.0",
      "published_year": 2026,
      "added_at": "2026-09-30T00:00:00.000Z",
      "has_dataset_profile": false,
      "license_class": "permissive",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": 0,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/793",
      "markdown": "https://papers.projxon.ai/entries/793.md",
      "api": "https://papers.projxon.ai/api/entries/793"
    },
    {
      "id": 866,
      "kind": "paper",
      "title": "AREX-2: Advancing Self-Improving Agents through Long-Horizon Reflective Tasks",
      "summary": "Targets the self-improving capability of LLM agents — iteratively refining a solution at test time — which rests on two complementary abilities: reflection (produce a solution better than the current one) and long-horizon execution (keep the iteration effective over many rounds). Both are treated as domain-agnostic and learned in scenarios suited to supervision: long-horizon improvement trajectories are synthesized from ML and algorithmic programming tasks, two domains offering verifiable feedback and reward for sustained iteration. The agent, built on Qwen3.8-27B, scores 81.8 on MLE-bench Lite and 70.7 on Frontier-CS, transfers to deep research (84.0 BrowseComp, 52.6 HLE, 92.2 GAIA, 93.8 DeepSearchQA), and keeps improving as its budget of rounds grows — evidence that long-horizon reflective data is an effective route toward self-improving agents.",
      "url": "https://arxiv.org/abs/2609.38288",
      "authors": [
        "Hongjin Qian",
        "Chaofan Li",
        "Kun Luo",
        "Wenqing Wei",
        "Jianlyu Chen",
        "Shuqi Lu",
        "Yuyang Hu",
        "Hongwang Xiao",
        "Hui Wang",
        "Chaozhuo Li",
        "Qiwei Ye",
        "Zhicheng Dou",
        "Defu Lian",
        "Zheng Liu"
      ],
      "tags": [
        "arex-2",
        "self-improving-agents",
        "long-horizon",
        "reflection",
        "test-time-iteration",
        "deep-research",
        "mle-bench",
        "browsecomp",
        "gaia"
      ],
      "venue": "arXiv:2609.38288 (cs.AI), submitted 29 Sep 2026",
      "source": "arxiv",
      "license": "",
      "published_year": 2026,
      "added_at": "2026-10-02T00:00:00.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": 0,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/866",
      "markdown": "https://papers.projxon.ai/entries/866.md",
      "api": "https://papers.projxon.ai/api/entries/866"
    }
  ]
}
