← Item page
← Mission Control
Link Triage Explainer · X Article · Claude Code workflows

A harness for every task: dynamic workflows in Claude Code

Thariq’s article introduces Claude Code “dynamic workflows”: JavaScript orchestration scripts that Claude can write for a specific task, then run as a resumable harness coordinating many subagents. The important shift is not just “more agents”; it is moving the loop, branching, stop conditions, and intermediate state out of a single chat context and into executable workflow code.

Author: Thariq Shihipar / Anthropic Captured from: X post 2061907337154367865 Published: 2026-06-02 Agent pass: 2026-06-03 Best fit: Dab execution systems, deep verification, large triage

Bottom line for Ananth / Dab

Dynamic workflows are useful when Dab/Claude should not merely “try hard in one session.” They are for tasks where quality comes from structure: fan-out, isolated contexts, adversarial review, tournaments, repeated loops, and explicit completion gates. For routine coding, they are likely overkill. For Mission Control link triage, self-audit mining, refactors, research, bug hunts, and decision reviews, they map directly onto patterns Ananth already wants from Dab.

What changed

  • Claude Code can create a task-specific JavaScript workflow on the fly.
  • The workflow can spawn and coordinate subagents, not just call a fixed prompt.
  • The script can choose models, use worktrees, persist intermediate state, and resume after interruption.

Why it matters

  • Long single-context work drifts, compresses away constraints, and can stop early.
  • Independent workers reduce self-preferential bias.
  • A coded harness makes the orchestration inspectable and reusable.

When not to use it

  • Simple feature work or one-page summaries.
  • Tasks where a normal skill/subagent is enough.
  • Low-value work where the extra token and wall-clock cost is not justified.

Mental model

Prompt
Ananth asks for a task that benefits from structured multi-agent execution: “find flaky-test cause,” “rank resumes,” “mine corrections,” “verify every claim.”
Claude writes harness
Claude Code generates a JavaScript workflow tailored to the task. The workflow owns the plan, queues, branching, models, and stop conditions.
Workflow runs
The runtime spawns subagents, sometimes in separate worktrees, and holds intermediate results in script variables rather than bloating the parent context.
Quality gates
Verifier/refuter/judge agents can check outputs against rubrics before synthesis. This is the real advantage over “just run multiple agents.”
Synthesis
The workflow returns a final report, patch set, ranking, or recommendation, with less context drift and more explicit provenance.

Pattern map

PatternUse it forMission Control / Dab fit
Classify → actRoute items by type, severity, model, or next action.Daily inbox/link triage, routing WhatsApp captures, deciding Sonnet vs Opus.
Fan-out → synthesizeMany independent slices that need clean context windows.Parallel research pages, source-map audits, broad market scans.
Adversarial verificationCheck claims, patches, plans, or conclusions against rubrics.Dab’s “verify independently” rule; pre-commit review; factual article checks.
Generate → filterCreate many options then dedupe and grade them.App names, strategy options, UI variants, Mission Control workflow ideas.
TournamentComparative judgment where absolute scoring is weak.Rank candidates, prioritize ideas, choose between architecture options.
Loop until doneUnknown-length tasks with a clear stop condition.Flaky bug reproduction, recurring triage passes, “keep going until no new findings.”

Failure modes it targets

  • Agentic laziness: one Claude handles part of a large task, then reports success. Workflows can maintain counters, queues, and stop conditions.
  • Self-preferential bias: Claude tends to trust its own work. Workflows can force independent verification agents or pairwise judges.
  • Goal drift: compaction and long conversations lose details. Workflows keep rules and state in code, not just in a mutable chat history.

How this differs from Dab’s current orchestration

  • Current: Dab scopes, delegates to Claude Code, then independently verifies. Good for bounded work.
  • Dynamic workflow: a generated harness runs multiple workers and quality gates inside Claude Code, while Dab still acts as PM/verifier outside it.
  • Static workflow: hand-built agent script that must cover edge cases in advance. Useful, but less task-adaptive.

High-value prompts to steal

  1. Flaky/debugging: “Use a workflow to form competing root-cause theories from logs, code, and recent changes; test each in isolated worktrees; stop only when one survives evidence.”
  2. Self-improvement: “Use a workflow to mine recent Dab/Claude sessions for repeated user corrections, cluster them, adversarially verify which should become rules, and draft skill/CLAUDE.md updates.”
  3. Notice Board triage: “Use a workflow to classify unexplored links by type, skip low-value links, expand the top candidate, and have a verifier check the explainer against source material before calling set-explainer.”
  4. Planning: “Use a workflow where product, engineering, user, and skeptic agents critique this plan, then a judge produces the smallest safe next phase.”
  5. Verification: “Use a workflow to extract every factual claim from this artifact, assign one checker per claim, verify sources, then synthesize corrections.”

Adoption recommendation

CandidateWhy it fitsSuggested gate
Best first trial: Dab self-audit miningClear corpus, clear output, directly improves Dab’s behavior and skills.Only accept rules backed by at least two real corrections or one severe miss.
Strong: deep link triage verifierCurrent cron explainers can benefit from source-check and “is this worth expanding?” classification.Budget: one substantial link per run; no session_search; verifier checks no invented facts.
Use carefully: large repo refactorsWorktrees and adversarial review match the pattern, but Pi resources may limit parallelism.Limit worker count and prohibit expensive commands unless explicitly allowed.
Use carefully: broad researchGreat fit structurally, but source quality and browsing limits matter.Require citations and a skeptical verifier; disclose blocked/uninspected sources.
Usually skip: small captures and normal coding tasksOverhead likely exceeds value.Use normal Dab → Claude Code execution loop instead.

Source notes

  • Primary source was the X Article body fetched through X API v2 tweet.fields=article; the public URL entity reported status 500 but the article body was available.
  • Cross-checked against the Claude blog mirror and Claude Code workflow docs via public text extraction.
  • No private credentials, headers, or local X auth details are included here.