This is a quick one, but it's important enough that we wanted to write something about it for the website.
If you’ve ever asked an AI agent to do a giant task and watched it finish the first 40%, congratulate itself, and then wander into the bushes, Thariq Shihipar’s post has the missing phrase for what went wrong: the harness.

Claude Code’s new dynamic workflows let Claude build that harness on the fly. Instead of one model trying to plan, execute, verify, and remember everything in one long context window, Claude can now spin up specialist agents, give them isolated jobs, route work to different models, run adversarial review, and stop only when the workflow’s goal is met.
Put simply: Claude Code is moving from “agent that writes code” toward “agent that designs the operating procedure for messy work.”
Core idea: Claude Code can now write a custom “harness” for the task. The harness is the system around the model: how it splits work, spawns subagents, assigns tools, runs verification, chooses models, isolates work, and decides when the job is done.
Why this exists: the default Claude Code harness is great for coding, but long, parallel, structured, or adversarial tasks can fail when one model has to plan and execute everything in a single context window.
The three failure modes Thariq names:
- Agentic laziness: Claude does part of a complex task, then declares it finished.
- Self-preferential bias: Claude prefers its own findings, especially when asked to judge or verify them.
- Goal drift: Claude loses fidelity to the original objective over many turns, especially after compaction.
What dynamic workflows actually do:
- Execute a JavaScript file with special functions for spawning and coordinating subagents.
- Use normal JS helpers like JSON, Math, and Array for processing.
- Choose which model each subagent uses.
- Decide whether subagents run in isolated worktrees.
- Resume if interrupted by the user or terminal exit.
Dynamic vs. static workflows: static workflows built with the Claude Agent SDK or claude -p tend to be generic because they need to handle many edge cases. Thariq’s point is that with Claude Opus 4.8, Claude is now smart enough to write a custom workflow for the specific task.
Trigger / usage note: you can ask Claude to create a workflow directly, or use the trigger word “ultracode” to push Claude Code toward workflow creation.
Workflow patterns Thariq highlights:
- Classify-and-act: use a classifier agent to route tasks or determine final output.
- Fan-out-and-synthesize: split a task into many smaller pieces, run clean-context agents, then merge their structured outputs.
- Adversarial verification: assign separate agents to challenge each output against a rubric.
- Generate-and-filter: generate many ideas, dedupe them, verify them, and keep the best.
- Tournament: have multiple agents attempt the same task, then judge pairwise until a winner emerges.
- Loop until done: keep spawning agents until a stop condition is met, like no new findings or no remaining errors.
The example prompts are extremely useful:
- Reproduce a flaky test that fails 1 in 50 runs by forming theories and testing them in worktrees.
- Mine the last 50 sessions for recurring corrections and turn them into
CLAUDE.mdrules. - Search six months of Slack incidents for recurring root causes where no ticket exists.
- Have investor, customer, and competitor agents critique a business plan.
- Rank 80 resumes for a backend role, double-check the top ten, and ask the user for a rubric.
- Brainstorm CLI names, then run a tournament to pick the top three.
- Rename a model across a codebase.
- Verify every technical claim in a blog post against the codebase.
Use cases Thariq names:
- Migrations and refactors: Bun was rewritten from Zig to Rust using workflows. The pattern is: break work into callsites, failing tests, modules, etc.; spin up a subagent per fix in a worktree; adversarially review; merge.
- Deep research: Claude’s
/deep-researchskill fans out web searches, fetches sources, verifies claims, and synthesizes a cited report. - Internal research: same pattern can compile status from Slack or explore how a feature works in a codebase.
- Deep verification: identify factual claims, assign subagents to check each claim, then verify source quality.
- Sorting: for 1,000+ qualitative items, use tournaments, pairwise comparisons, or bucket-ranking instead of asking one model to score everything.
- Memory and rule adherence: assign one verifier per rule; use a skeptic persona to reduce false positives; mine past corrections and reviews into better
CLAUDE.mdrules. - Root-cause investigation: spawn agents for logs, files, and data; generate independent hypotheses; verify and refute them separately.
- Triage at scale: classify backlog items, dedupe against existing tickets, fix what can be fixed, and escalate the rest.
- Quarantine: agents reading untrusted public content should be blocked from high-privilege actions.
- Exploration and taste: useful for naming, design, and other rubric-based judgment tasks.
- Evals: compare and grade outputs from multiple agents, then use that to refine a skill.
- Model routing: use a classifier agent to decide whether Sonnet or Opus is appropriate based on the complexity and shape of the task.
When not to use it: workflows are new, often use more tokens, and are unnecessary for many normal coding tasks. His practical test is basically: does this task really need more compute? Most routine coding work does not need five reviewers.
Prompting tips:
- Be detailed when asking for workflows.
- Use a “quick workflow” for small checks, like adversarially reviewing one assumption.
- Pair repeatable workflows with
/loop. - Pair hard completion requirements with
/goal. - Set token budgets directly, like “use 10k tokens.”
- Save workflows with
s. - Check them into
~/.claude/workflows. - Share them through a skill by including JS workflow files and referencing them in
SKILL.MD. - Treat shared workflows as templates when flexibility matters, rather than scripts Claude must run verbatim.
So here's the takeaway point: Claude Code is moving from “agent that codes” to “agent that designs the operating procedure for the work.” The valuable part is the structure: separate contexts, independent hypotheses, adversarial review, assigning token budgets (very important, as we wrote about), model routing, and stop conditions.
All of that is the difference between “please do this big messy task” and “build a small temporary organization around this task, then run it.”