Skip to content

Day 39 of 52 · about 20 min · Subagents · Bonus

Spread a big change across many agents with workflows

When the same check has to run across forty files, one conversation ends up holding forty files’ worth of reading. A workflow gives each piece to its own agent, has other agents check the findings, and hands you one report.

You’ll finish with

  • A workflow run that reviewed several files with separate agents and cross-checked the findings
  • That workflow saved as a slash command for next time

You’ll need

  • A paid plan or Anthropic API access. On Pro, first turn on the Dynamic workflows row in /config (workflows docs).
  • A workflow can use a lot more tokens than doing the task in one conversation. Start with one folder, not the whole repository.
  • Claude Code open in a git project. The practice project works.

Before you start

Tell us about your setup and the steps change to fit it. Your answers stay in this browser, and you can change them at any time.

Which system are you on?

Commands differ between systems. Pick the one you’ll run Claude Code on.

The steps

One step at a time. When a step’s check matches, tick it and the next one opens.

0 of 4 steps done0%
  1. Step 1 of 4: Ask for a workflow

    Describe a task that repeats across files and ask for it as a workflow.
    In Claude Code

    You type: use a workflow to review every file in src/ for inputs that are not validated, and adversarially verify each finding before reporting it

    What happens: Claude writes a script, then asks before it runs, listing the planned phases.

    Adding the keyword ultracode to a prompt does the same.

    Check it worked

    A prompt with the phases and Yes, run it, View raw script and No. Read the script if you like, then run it. In auto mode, only your first workflow asks.

  2. Step 2 of 4: Follow its agents

    Open the progress view and look inside a phase and an agent.
    In Claude Code

    You type: /workflows

    What happens: Each phase with its agent count. Enter opens a phase, then an agent. Esc backs out.

    What happens: p pauses. x stops the run, or just the selected agent.

    The run works in the background; your session stays free.

    Check it worked

    An agent’s detail shows its prompt, its recent tool calls and its result.

    If it didn’t work

    A `Large workflow` warning appears

    The run planned over 25 agents or a very large token total. Back out with Esc, stop the run with x and ask again on a smaller slice.

  3. Step 3 of 4: Read the report

    When the run ends, one report lands in your session.

    In order:

    1. Tool

      The script starts agents

      It decides how to split the files

    2. Tool

      Each agent reviews its part

    3. Tool

      Other agents try to disprove each finding

    4. Claude

      One report comes back

      Only the final answer enters your conversation

    The script holds the plan and the in-between results, not Claude’s context.

    Check it worked

    One report in your session, each finding with its file and the problem. Ask Claude to fix the ones you agree with.

  4. Step 4 of 4: Save it as a command

    Keep the script so the same review runs the same way next time.
    In Claude Code

    You type: /workflows

    What happens: Select the run and press s.

    What happens: Tab switches between .claude/workflows/ (shared with the project) and ~/.claude/workflows/ (only you).

    What happens: Enter saves.

    Saved workflows show up in / autocomplete next to the bundled /deep-research.

    Check it worked

    In a new session or after /reload-skills, type /: your workflow is listed. Run it as /<name>.

Finish · 4 of 4 steps to go

You can fan work out and get one checked answer

Use a workflow when the work outgrows a handful of subagents. For a couple of questions, plain subagents (Day 19) are enough.

What you’ll have checked

  • A run finished with a single report
  • The workflow runs again from /

Lesson updates by email

Get lesson updates by email

Leave your email and we’ll tell you when we add or update a lesson.

We’ll email you when we add or update a lesson. We use your email only for this. Privacy policy

Claude Code for your team

Want Claude Code set up across your team?

HorizonLux sets up and repairs Claude Code for teams: CLAUDE.md rules, hooks that enforce them and reviewed MCP servers. Book a free call to talk it through.

Questions

Questions about Day 39

Does a workflow skip my permission rules?

No. Its agents’ tool calls get the same permission checks as any other.

Sources

Checked against the official Claude Code docs on .

Independent resource, not affiliated with Anthropic. HorizonLux wrote this lesson; Claude Code is made by Anthropic.