Back to today's list

LLM-as-Code Agentic Programming for Agent Harness

Junjia Qi, Zichuan Fu, Jingtong Gao, Wenlin Zhang, Hanyu Yan, Xian Wu, Xiangyu Zhao

Published Jun 16, 2026
Editorial review6.8
Relevance0.560
Freshness0.000

Why It Matters

What makes this one worth your time

This approach could improve the stability and reliability of LLM-based systems, which is crucial for their deployment in real-world applications.

Agentic Programming shifts control flow from LLMs to programs to enhance reliability.

Summary

The paper proposes a new programming paradigm called Agentic Programming, where the control flow is managed by the program itself rather than the LLM, which is used only for tasks requiring reasoning or generation. This approach aims to address issues like token explosion and control-flow hallucination by structuring the LLM's context as a directed acyclic graph based on execution history.

Key contributions

  • Introduction of Agentic Programming paradigm.
  • Proposal of LLM-as-Code for adaptive reasoning or generation tasks.
  • Demonstration of improved stability in long visual operation sequences.

Notable insights

  • The use of a directed acyclic graph for context management could reduce token explosion.
  • Separating control flow from reasoning tasks may mitigate issues like control-flow hallucination.

Possible limitations

  • Not stated in the abstract

Abstract

arXiv:2606.15874v1 Announce Type: new Abstract: Every major LLM agent framework gives the LLM the role of orchestrator; the model decides what to do next, when to call tools, and when to stop. We argue that token explosion, control-flow hallucination, and unreliable completion are not implementation bugs but architectural consequences of assigning the deterministic work of looping, branching, and sequencing to a probabilistic system. A better prompt or a stronger model cannot guarantee the reliability of the LLM agent. We therefore propose Agentic Programming, in which the program governs all control flow, and the LLM is itself part of it, an adaptive component we call LLM-as-Code and invoke only where a task calls for reasoning or generation. Within each call the model keeps full flexibility, but it cannot alter the program's execution path. With control in the program, the LLM's context is built from the execution history's call tree and forms a directed acyclic graph (DAG). Each call's context length is then determined by its call depth rather than by accumulation over steps. A case study of computer-use agents shows that the design is practical, not just a theoretical stance, substantially improving the stability of long visual operation sequences.