EPS
← All batches·2605.06898

Self-Programmed Execution for Language-Model Agents

topic: general_aitop score: 6released: 2026-05-11first surfaced: 2026-05-11arXivPDFgeneral_important2026-05-11

Authors: Luke J. O'Connor

arXiv · PDF

Summary

The author proposes "self-programmed execution" (SPE), an agent architecture where the model's own output is the orchestration program—instead of a fixed harness deciding "now call the model, now execute a tool, now call the model again," the model completion itself decides what happens next by writing executable code that can recursively invoke itself. To make this work, the author introduces Spell, a Lisp-based language where programs can edit and re-evaluate themselves without replaying side effects (like model calls). Experiments show that existing frontier models, not trained for this paradigm, can already operate in this regime and accomplish challenging tasks.

Main takeaways:

  • Traditional agents use a fixed orchestrator program that decides the state transition between turns; SPE removes this fixed policy—the model completion itself is the orchestrator
  • Formalized using "agentic machines" where the model can load any state of an embedded copy of the machine, giving it full control over orchestration
  • Spell language lets programs edit and re-evaluate themselves without replaying side effects (e.g., re-evaluating doesn't re-run previous model invocations)
  • Existing frontier models, not trained for SPE or Spell, can already operate in this regime and solve challenging agentic tasks
  • Raises the question of what self-orchestration strategies might emerge if models were specifically trained for self-programmed execution

Relevance

Not directly related to my persona/midtraining work. This is about agent orchestration and control flow, whereas I'm studying how behaviors are installed and conditioned during training. The notion of removing fixed scaffolding and letting the model self-orchestrate is conceptually interesting but orthogonal to understanding persona installation paths.

Abstract

arXiv:2605.06898v1 Announce Type: new Abstract: At the heart of existing language model agents is a fixed orchestrator program responsible for the state transition between consecutive turns. This paper introduces self-programmed execution (SPE), an agent architecture in which the model completion is itself the orchestrator program, and the harness evaluates this program but does not impose its own orchestration policy. I formalize this idea using agentic machines: an SPE state is one from which a model completion can load any state of an embedded copy of the machine, meaning that it is subject to no fixed turn-to-turn orchestration policy. Realizing SPE in practice is nontrivial because the same data is both model context and executable program. I therefore introduce Spell, a Lisp-based language in which programs can edit and re-evaluate themselves, and effectful expressions like model invocations are structured such that re-evaluating an edited program does not replay its side effects. Experiments with existing models, not trained for SPE or Spell, show that frontier models can operate in this regime and accomplish challenging agentic tasks. These results demonstrate how an LM can act as an agent without any fixed orchestration policy, and they raise the question of what self-orchestration strategies might be learned by a model trained for self-programmed execution. Code is available at https://github.com/lukejoconnor/spell .