LongCLI-Bench: A Preliminary Benchmark and Study for Long-horizon Agentic Programming in Command-Line Interfaces

Yukang Feng, Jianwen Sun, Zelai Yang, Jiaxin Ai, Chuanhao Li, Zizhen Li, Fanrui Zhang, Kang He, Rui Ma, Jifan Lin, Jie Sun, Yang Xiao, Sizhuo Zhou, Wenxiao Wu, Yiming Liu, Pengfei Liu, Shenglin Zhang, Kaipeng Zhang

TL;DR

Autonomous AI coding agents struggle significantly with complex, multi-step software engineering tasks. To rigorously evaluate them, the authors introduce LongCLI-Bench, a benchmark of 20 long-horizon tasks designed to be free from GitHub data contamination. Testing reveals that even state-of-the-art agents score below a 20% pass rate—primarily failing during early-stage planning—but human-agent collaboration can dramatically close this capability gap.

What Problem Does This Paper Address?

While Large Language Models (LLMs) excel at generating short code snippets or solving isolated bugs, real-world software engineering requires navigating massive codebases, executing long sequences of commands, and maintaining context over extended periods.

Existing benchmarks fall short in three major ways:

  1. Short Horizons: They focus on simple, short-duration tasks (like HumanEval or MBPP).
  2. Data Contamination: They scrape public GitHub repositories, meaning the evaluation tasks may have already been included in the models' training data.
  3. Coarse Metrics: They rely on binary pass/fail metrics, which fail to diagnose where or why an agent went wrong in a complex workflow.

To bridge these gaps, this paper introduces a clean, complex, and fine-grained benchmark to evaluate autonomous agents operating via Command-Line Interfaces (CLIs).

Methods

The authors introduce several novel evaluation mechanisms to better understand agent behavior:

  • Dual-Set Testing Protocol: Instead of just checking if the final output works, the evaluation splits tests into two distinct categories:
  • Fail$\rightarrow$Pass (F2P): Verifies that the agent successfully implemented the new requirements.
  • Pass$\rightarrow$Pass (P2P): Regression testing to ensure the agent's modifications didn't break pre-existing system functionality.
  • Step-Level Scoring: Rather than a binary pass/fail, the benchmark breaks down requirements into sub-tasks, providing a granular score that reflects partial progress.
  • Human-Agent Collaboration Frameworks: They test two collaborative settings to see how human intervention alters performance:
  • Static Plan Injection: Injecting a high-level strategic plan before execution.
  • Dynamic Interactive Guidance: Allowing the agent to request human guidance (up to 3 times) during execution to get back on track.

Datasets

The paper introduces LongCLI-Bench, a dataset specifically curated to avoid data contamination and ensure high complexity:

  • Sources: Curated from 958 computer science assignments and 50 real-world workflows, filtered down to 20 exceptionally challenging tasks.
  • Scale: Tasks average over 15,000 lines of code (LoC) and 104 source files across multiple languages (C, Python, Java, JavaScript). For comparison, existing benchmarks like Terminal-Bench average only 227 LoC.
  • Taxonomy: Covers four engineering categories (From Scratch, Feature Addition, Bug Fixing, Refactoring) across six domains (System Programming, Web Development, Data Engineering, Machine Learning, Applications, and DevOps).

Key Insights and Ideas

  • The "Early-Stage" Bottleneck: Step-level analysis showed that the majority of agent failures happen very early on, with most tasks stalling at less than 30% completion. Agents fail due to weak strategic planning and entering repetitive loops rather than making local syntax errors.
  • The Regression Trap: While agents achieved high average P2P step scores (>98%), their actual P2P pass rates were much lower (70–88%). This means that even when agents successfully implement a new feature, they inadvertently break existing code in 12% to 30% of cases.
  • Upfront Planning Beats Self-Correction: Letting an agent try to fix its own mistakes (self-correction) yields minor improvements. However, giving the agent a solid, high-level plan upfront (Plan Injection) is significantly more effective and computationally efficient, preventing the agent from going down wrong logical paths in the first place.

Key Results

  • Low Autonomous Success: In a single-turn autonomous setting, all tested models achieved an overall pass rate below 20%. The top performer was Claude-Opus-4.6 at 16.7%, followed closely by GPT-5.3-Codex at 15.0%. Open-source models like DeepSeek-V3.1 trailed at 5.0%.
  • Collaboration Supercharges Performance: Introducing human-agent collaboration drastically improved outcomes. For example, Claude-Opus-4.6 jumped from a 16.7% base pass rate to 55.0% with self-correction, 58.3% with plan injection, and a peak of 61.7% when combining plan injection with dynamic interactive guidance.
Overall performance of various models on LongCLI-Bench, showing low autonomous pass rates but higher step-level completion scores.

Limitations and Future Work

  • High Curation Effort: Creating high-quality, uncontaminated tasks with custom test suites is incredibly labor-intensive. Each task required an average of 40 hours of expert manual work, limiting the benchmark's initial size to 20 tasks.
  • Coarse Quality Metrics: While step-level scoring provides excellent granularity on functional completion, it does not evaluate non-functional aspects like code quality, efficiency, or security.
  • Future Directions: The authors suggest that future research should pivot away from chasing pure autonomy for complex tasks and instead focus on optimizing synergistic human-agent workflows and long-horizon contextual consistency.

Summary updated

BibTeX
@inproceedings{feng2026longcli,
  author = {Yukang Feng and Jianwen Sun and Zelai Yang and Jiaxin Ai and Chuanhao Li and Zizhen Li and Fanrui Zhang and Kang He and Rui Ma and Jifan Lin and Jie Sun and Yang Xiao and Sizhuo Zhou and Wenxiao Wu and Yiming Liu and Pengfei Liu and Shenglin Zhang and Kaipeng Zhang},
  title = {{LongCLI-Bench: A Preliminary Benchmark and Study for Long-horizon Agentic Programming in Command-Line Interfaces}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2026},
  doi = {10.18653/v1/2026.findings-acl.1497},
}
Figure