Theo: Use One-Off Code to Coordinate Agent Loops

A short example of an agent writing temporary code to trigger a workflow makes Theo rethink how models can prompt themselves.

ThTheoSpeaker
Channel
Theo - t3․gg
Published
Jun 18, 2026
Video
0:36
Read
1 min
Original
English
Open on YouTube
Scroll to read and the video shrinks to the bottom-right corner. Captions follow your reading language.
Reading languageAvailable in 2 languages
You're reading the original English.
SUMMARY

In 30 seconds

Theo describes an agent that wrote 240 lines of disposable code to run a workflow once. He sees it as an example of models generating code to coordinate further prompts, while leaving open whether the usage cost is worthwhile for everyone.

  1. 1Code between runsThe agent wrote 240 lines of disposable code to trigger a workflow once.
  2. 2A loop in practiceTheo sees the example as an agent using its own code to coordinate further prompts.
  3. 3Consider usageHe leaves the decision to use it open while encouraging viewers to study what the technique enables.

Takeaways

  1. Code can act as a temporary step between model runs.
  2. An agent can write a one-off script to trigger a workflow.
  3. The approach can consume substantial usage, so Theo suggests learning from the example before deciding whether to use it.
FULL TEXT

Read the edited text by chapter

Transcript only
01

A disposable workflow script

Theo describes 240 lines of code written to run once. The script serves as a step between model runs.

Code can be a step between model runs. In this example, the agent wrote 240 lines of throwaway code that will only execute once to trigger a workflow. When people talk about agent loops and letting an agent prompt itself, this is a striking example.

02

What agent loops enable

The example prompts Theo to rethink how agents can write code to prompt themselves. He also raises the question of usage cost.

Should you use this yourself and burn through your usage? Maybe. At the very least, look at it and learn from it: letting models write their own code to drive additional prompts can unlock powerful workflows. It has made me think more deeply about how I use these tools.

More from this channel

5 slides38:47EN
Theo - t3․gg· Oct 28, 2026Theo’s Long-Running Agent Experiments: Verification, Compute and CostTheo Browne · Ping LabsA skateboard game and two compiler projects show how repeated checks and flexible compute can sustain agent work—and how expensive those loops can become.Coding agentsAgent engineeringAI cost & performance+2
5 slides36:07EN
Theo - t3․gg· Oct 27, 2026Theo on Token Costs, Coding Agents, and the Price of AI CapabilityTheo Browne · Ping LabsA viral estimate of Lauren's AI spending prompts a closer look at cache pricing, benchmarks, and the changing work of coding agents.AI cost & performanceCoding agentsInference+1
5 slides30:37EN
Theo - t3․gg· Oct 26, 2026Theo’s Three Skills for Reviewing and Shipping with Coding AgentsTheo Browne · Ping LabsHow sol-loop, full-send and full-stop encode review, verification and different levels of merge authority.Agent skillsCoding agentsCode review & verification+2
2 slides0:43EN
Theo - t3․gg· Oct 23, 2026Theo Distinguishes Security Vulnerabilities from Active AttacksTheo Browne · Ping LabsA short explanation of why disclosed software flaws and reported attacks are different kinds of security news.CybersecuritySoftware engineering
6 slides29:22EN
Theo - t3․gg· Oct 22, 2026Theo on Security Vulnerabilities, Stolen API Keys and AITheo Browne · Ping LabsA look at the gap between vulnerability disclosure and patching, and a speculative account of why stolen inference keys may be valuable.CybersecurityAI securitySoftware engineering+1
4 slides31:13EN
Theo - t3․gg· Oct 20, 2026Theo on Why Smarter Models Help More Than DevelopersTheo Browne · Ping LabsFrom game modifications to compiler experiments, Theo revisits his assumptions about who benefits from more capable AI.Coding agentsDeveloper productivityHuman-AI Collaboration+1