Why I Stopped Writing Prompts for Claude and Started Writing Loops
Boris, the author of Claude Code, explains how Dynamic Workflows let Claude run hundreds of agents in a single session, replace traditional prompting with loop‑based orchestration, and avoid common failure modes such as agentic laziness, self‑bias, and goal drift.
Boris, the author of Claude Code, is quoted saying he no longer writes prompts for Claude but writes loops.
I'm no longer writing prompts for Claude; I have a bunch of loops running. My job is to write loops.
In a 30‑minute talk he described his daily Claude Code setup: Claude Code + loops + Dynamic Workflow.
What is Dynamic Workflow
Anthropic added Dynamic Workflows to Claude Code on May 28 2026. The default Claude Code packs planning and execution in a single context window, which works for most coding tasks but breaks on long, parallel, highly structured, or adversarial tasks.
Previously Anthropic engineers built harnesses manually. Dynamic Workflows let Claude generate a JavaScript harness on the fly, using special spawn functions to create sub‑agents and handle data flow.
Compared with the default harness, Dynamic Workflows add three capabilities:
Each sub‑agent has an independent context window and a single goal, preventing cross‑contamination.
Each sub‑agent can specify a model: Opus for hard reasoning, Haiku for cheap exploration, Sonnet for intermediate steps.
The isolation level can be chosen: worktree (separate git checkout) or remote (no checkout).
To start a workflow, simply ask Claude “give me a workflow …” or use the trigger word ultracode. The workflow can be paused and later resumed.
Three failure modes it addresses
Agentic laziness : complex multi‑step tasks stop early (e.g., 50 security audits reported as only 20 completed).
Self‑preferential bias : Claude tends to favor its own output when self‑verifying.
Goal drift : after many rounds the task drifts and constraints disappear (e.g., “don’t do X” vanishes by round 47).
Workflows solve these by giving each Claude its own context, a focused goal, and isolated state.
Static vs Dynamic
Static workflows using the Claude Agent SDK or claude -p require writing a single script that anticipates all edge cases, so they are conservative.
Dynamic workflows are generated on‑the‑fly for the specific task, tailoring to the code, documentation, pricing data, and even performing adversarial passes.
Core API trio
agent(), parallel(), pipeline().
parallel()is a barrier: it fans out and waits for all results. pipeline() streams each element through stages. Choose based on whether the next step must wait for all results.
Six patterns used by Anthropic engineers
Classify‑and‑act : a classifier agent routes tasks, using cheap models for classification and expensive models only where needed.
Fan‑out‑and‑synthesize : split into many independent sub‑tasks and merge results; ideal for large security audits.
Adversarial verification : each output agent has an independent verifier to avoid self‑bias.
Generate‑and‑filter : generate many ideas then filter with a rubric, preventing premature commitments.
Tournament : pairwise comparisons for reliable ranking, useful for ordering large lists.
Loop until done : unknown number of iterations, using /goal for a hard stop criterion and /loop to schedule the workflow.
Real workflows usually combine 2‑4 of these patterns; the Bun rewrite from Zig to Rust used “Fan‑out → Adversarial verification → Loop until done”.
Common pitfalls
Don’t use a workflow for tasks a normal session can handle.
Set a token budget; uncontrolled workflows can consume 5‑10× the expected tokens.
Avoid letting the same agent both act and verify, to prevent self‑preference.
Don’t conflate parallel() and pipeline(); their barrier behavior differs.
Loop mode requires a /goal; otherwise it stops at the first soft completion.
Never feed untrusted content directly to execution agents; quarantine input.
Use tournament ranking instead of absolute scores for ordering.
Persist successful workflows via the “s” command to ~/.claude/workflows or package as a Skill.
Observer’s note
A reader likened Boris’s explanation to the full UX philosophy of n8n: one loop watches webhooks, another watches schedules, another watches queues. You no longer run tasks; you maintain pipelines, but the orchestration layer must be stable before adding dynamic routing.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
AI Engineering
Focused on cutting‑edge product and technology information and practical experience sharing in the AI field (large models, MLOps/LLMOps, AI application development, AI infrastructure).
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
