Coding-Agent Loops: Triggers, Goals and the Cost of Repetition

Matthew Berman explains event-triggered and scheduled agent workflows, shows examples in Cursor and Claude Code, and considers their limits.

BCBoris ChernyGast · Anthropic
Kanal
Matthew Berman
Veröffentlicht
9. Juni 2026
Video
12:59
Lesezeit
4 Min.
Folien
3
Original
Englisch
Auf YouTube öffnen
Beim Scrollen schrumpft das Video in die rechte untere Ecke und läuft weiter. Untertitel folgen Ihrer Lesesprache.
LesespracheIn 2 Sprachen verfügbar
Diesen Artikel gibt es noch nicht auf Deutsch, daher wird das Original (Englisch) angezeigt.
ZUSAMMENFASSUNG

In 30 Sekunden

In this June 2026 video, Matthew Berman argues that engineers can shift from repeatedly prompting coding agents to designing workflows that pursue and check a goal. He demonstrates a pull-request automation and a recurring Claude Code prompt, while acknowledging specification difficulty and token costs. His forecasts about software factories and autonomous goal-setting are speculative; scheduled prompts do not themselves guarantee completion, safe changes or automatic stopping. The video is sponsored by here.now.

  1. 1Triggers and goalsBerman defines a loop as an agent process started by a trigger and guided by a verifiable goal.
  2. 2A PR review exampleHe shows a Cursor automation triggered by an opened pull request and instructed to review, fix issues and check CI.
  3. 3Other triggersSchedules, events and manual initiation can start agent work.
  4. 4Claude Code exampleHe shows a recurring prompt comparing implementation with a specification; recurrence does not guarantee completion or cancellation.
  5. 5Limits and costVague end states and repeated model calls can increase difficulty and spending.
  6. 6A speculative futureBerman imagines AI setting its own goals and building its own development systems.

Das Wichtigste

  1. Berman frames an agent loop around a trigger, a goal and some way to evaluate progress.
  2. Tests can provide concrete checks, while a model’s judgment of an abstract goal can itself be mistaken.
  3. A recurring prompt or event-triggered automation is not automatically guaranteed to continue until a goal is met or to stop when it is.
  4. Berman’s reinforcement-learning analogy describes feedback, not necessarily model training or weight updates.
  5. Ambiguous specifications and repeated model calls can make automation hard to control and expensive.
  6. Predictions about autonomous software factories and recursive self-improvement remain uncertain.
VOLLTEXT

Den bearbeiteten Text nach Kapiteln lesen

Nur das Transkript
01

What Berman calls a loop

Berman cites Boris Cherny and Peter Steinberger and defines a loop through triggers and goals. He compares feedback with reinforcement learning.

Matthew Berman discusses coding-agent loops in a June 2026 video, citing comments by Anthropic’s Boris Cherny and OpenAI’s Peter Steinberger. Both describe designing systems that direct agents rather than manually issuing each prompt. Berman calls this an important direction for software engineering, a forecast rather than an established universal practice.

The video is sponsored by here.now. Berman defines a loop as work initiated by a trigger and directed toward a goal. Instead of a human repeatedly issuing the next instruction, the designer specifies an intended end state and lets the agent work toward it.

He says the goal should be verifiable: passing tests are one possible check, while a model can judge a less concrete outcome. Automated tests only cover what they test, and an AI judge can be wrong, so either kind of check depends on how well it represents the actual goal.

Berman compares this feedback to reinforcement learning, in which a reward signals progress toward an objective. The analogy is about feedback and evaluation: repeatedly prompting an agent and checking results does not by itself train model weights or constitute reinforcement learning.

02

Pull requests and triggers

He shows a Cursor pull-request automation and discusses schedules, events and manual starts. He explains why specifying a feature’s end state is difficult.

In Cursor Automations, Berman shows an example triggered when a pull request opens in his Astro Hub project. Its instruction asks the agent to review the PR, fix potential issues, commit to the same PR and ensure tests and CI pass. This describes the requested workflow, not evidence that the configuration has successfully completed every such task.

PR-triggered review automation
FOLIE 1 / 3PR-triggered review automationThe Cursor configuration shows the trigger and the review, repair and CI instructions Berman describes.

A concrete test result can make success easier to check, but Berman says a broad request such as “build this feature” is harder to specify. Much product development involves exploring what is needed and revising it, so writing a complete end state in advance can be difficult.

Scheduled triggers
FOLIE 2 / 3Scheduled triggersThe automation interface lists recurring schedules alongside event-based integrations.

He groups triggers into events such as a PR opening, a recurring schedule such as every 30 minutes, and a person initiating work. A schedule or event can start an agent run; whether it retries, checks an outcome or stops depends on the actual workflow and its implementation.

Berman says loops can be made more elaborate with skills and additional logic. He distinguishes the minimal idea of a trigger and goal from the harder engineering needed to make a system choose useful next actions and judge completion reliably.

03

Claude Code and practical limits

Berman demonstrates recurring prompts and discusses ambiguous goals and token costs. A recurring scheduler is distinct from guaranteed goal-driven completion.

He shows Claude Code’s /loop command and suggests an example that periodically compares a project against spec.md and continues building. A scheduled prompt can request that work, but running it repeatedly is not a guarantee that each execution starts a separate agent, that the specification is achieved or that the schedule cancels itself on success.

A recurring specification-check prompt
FOLIE 3 / 3A recurring specification-check promptBerman types an example asking an agent to compare work with a specification on a five-minute schedule.

Berman also describes omitting a fixed interval and asking the system to continue toward the goal. The behavior of a particular /loop implementation depends on its version and session; current Claude Code documentation describes session-scoped scheduling and distinguishes it from turn-by-turn goal continuation.

Berman says a simple loop is easy to write, but a continuously operating software factory is far harder. When the end state cannot be checked deterministically, the agent may repeatedly spend tokens without actually resolving the underlying problem.

He identifies cost as another practical constraint: more autonomous work generally means more model calls and potentially higher bills. He predicts that costs will fall as the technology becomes more efficient, but that is a forecast rather than a guarantee for any particular workload.

04

Who can use loops and what comes next

He discusses access to model budgets and his view of software factories. He closes with a speculative scenario involving AI-directed development.

Berman suggests that only a very small fraction of engineers can experiment at the most expensive end of this approach and cites purportedly generous internal token budgets and a reported high usage figure. The video provides no representative adoption study or independently verified accounting of company-wide allowances, so those figures are his claims.

He predicts that engineering will increasingly involve designing software factories that direct agents, instead of continually writing prompts or code. That is his vision of a possible future; it does not establish the pace or extent of adoption.

Berman distinguishes a loop from an automation by emphasizing a decision about whether the goal has been reached. This is his useful framing for the examples, rather than a universal technical definition: automations can also include conditions and feedback, and a repeating schedule can run without a meaningful success check.

Finally, he asks whether humans will always set goals. He imagines AI choosing features and products and designing its own development system, connecting the idea to recursive self-improvement. Anthropic’s essay discusses AI accelerating research while explicitly saying fully autonomous recursive self-improvement had not yet been achieved and is not inevitable.

Mehr aus diesem Kanal

12 Folien34:21EN
Matthew Berman· 27. Okt. 2026Matthew Berman Examines Anthropic’s IPO Filing, AI Growth and GovernanceMatthew Berman, Sam Altman · Forward FutureThe presenter reviews the S-1’s financial metrics, compute strategy and voting structure while questioning the tension between rapid AI development and safety.AnthropicAI SafetyEnterprise-KI+2
0:26EN
Matthew Berman· 25. Okt. 2026Sam Altman on Human Values and Problem-Solving in an AI WorldSam Altman · OpenAIIn a short interview excerpt, Altman considers the enjoyment of solving hard problems and the human role in interpreting results.Human-AI CollaborationFuture of WorkAI Strategy
2 Folien0:36EN
Matthew Berman· 25. Okt. 2026Kimi K3.1 and a Rubik’s Cube Solver DemonstrationMatthew Berman · Forward FutureMatthew Berman shows a scrambled virtual cube being solved and gives the Kimi K3.1 test a favorable assessment.EvalsCoding-AgentenOpen-weight models
2 Folien0:21EN
Matthew Berman· 24. Okt. 2026An AI-Generated Kimi Benchmark Chart Used Invented ScoresMatthew Berman · Forward FutureMatthew Berman asks for a graph of Kimi K3.1 Pro benchmarks, then discovers that the displayed figures are illustrative placeholders.BenchmarksEvalsGenerative media
6 Folien25:50EN
Matthew Berman· 24. Okt. 2026Kimi K3.1 Pro Tested: Strong 3D Demos, Uneven Results and Competitive PricingMatthew Berman · Forward FutureMatthew Berman tests the open-weight model on coding, 3D rendering and visual explanations, then compares benchmark results and prices.Open-weight modelsBenchmarksAI cost & performance+1
2 Folien32:20EN
Matthew Berman· 23. Okt. 2026Who Is Local AI For? The Costs, Trade-offs and a Hybrid FutureMatthew Berman · Forward FutureMatthew Berman weighs data control and independence against hardware cost, setup complexity and inference speed.Local inferenceOpen-weight modelsAI cost & performance+1