Learn Claude Code by Building DevPulse · Chapter 12

A bug scan in parallel

Checking four files for bugs one after another is slow, so how do you check them all at once? By the end of this chapter, DevPulse has a saved bug-scan workflow that sends one agent per file and returns one ranked list.

One sitting~6 min read, ~10 min to build along
You start fromchapter 11's DevPulse
You builda saved bug-scan workflow for DevPulse
Chapter 12 of 15many agents, one answer
Goes with Episode 12"How do I run a big job in parallel?". The video is being made. This page teaches the same steps, at your own pace.
In a hurry?Jump to the quick reference: every command and key in this chapter, what it does, and when to use it.
Every prompt, ready to copyThis chapter's prompts and commands, each with a Copy button. Type them yourself first; copy if you are stuck or behind.
Where you areDevPulse with its server, page, streak code and MCP tools, from chapters 1 to 11.

Four files, one at a time

Say you want a bug check on DevPulse before you share it. There are four files that matter.

You could ask about each file in turn. That works, but you wait four times. And the four checks do not need each other at all.

The question for this chapter

How do you run a big job in parallel, and still get one answer back?

Switch workflows on first

A workflow is a small script that sends several agents off at once and gathers their answers. Check that workflows are on before you ask for one.

Type this into Claude Code/config

Then type workflow to filter the list.

/config filtered by workflow: Dynamic workflows true, Ultracode keyword trigger true, Dynamic workflow size medium (default).
Three settings. Dynamic workflows must be true. The size says how many agents a workflow may use.
The Dynamic workflow size setting changed to small (aim for fewer than 5 agents).
We set the size to small: fewer than five agents. Four files need only four.
Careful here

On the Pro plan, workflows are not on by default. Switch them on here, and keep the size small. Every agent spends tokens from your plan.

Ask for the scan

Start the request with Use a workflow. Name the parts, and say what you want back.

Type this into Claude Code, as one lineUse a workflow: check each DevPulse file (server.py, index.html, streak.js, mcp/devpulse_mcp.py) for bugs in parallel, then give me one list, most serious first. Don't change any code.
Run a dynamic workflow? Dynamic workflows can use a lot of tokens. Options: 1. Yes, run it 2. View raw script 3. No.
Claude writes the script, then asks first. It warns about tokens. You can read the script before you say yes.

Choose Yes, run it. Then open the panel that shows the agents at work.

Type this into Claude Code/workflows
The /workflows panel for devpulse-bug-scan: Review, 4 agents. review:server.py 11.1k tokens, review:index.html 14.8k, review:streak.js 7.7k done, review:mcp/devpulse_mcp.py 9.2k. Keys: select, x stop, p pause, esc back, s save.
One agent per file, side by side, each with its own token count. x stops one, p pauses it.

One list back, and a saved workflow

When the agents finish, the panel shows what the whole job cost.

Completed in 24s, 4 agents, 44.2k tokens. Save dynamic workflow: Project scope, .claude/workflows/devpulse-bug-scan.js.
24 seconds, 4 agents, 44.2k tokens. Press s to save it in the project, in .claude/workflows/.

Back in the chat, Claude merges the four answers into one list, most serious first.

The end of the ranked list: findings 10 to 13, each with file and line. Coverage: streak.js returned no findings, treat as unconfirmed. I also saved the workflow as .claude/workflows/devpulse-bug-scan.js.
Each finding names a file and a line. Note the coverage line: no bugs in streak.js is "unconfirmed", not "clean". The grey line, fix the medium-severity bugs, is only a suggestion.

We asked it not to change any code. Fixing is a separate step, and you choose which bugs.

What a workflow costs

Faster is not cheaper. Four agents each read their own file and think on their own, so the tokens add up.

What we sawWhat it means for you
24 secondsThe four checks ran at the same time, not one after another
4 agentsOne per file; the small size kept it under five
44.2k tokensAll of it counts toward your plan's limit, for one scan

So use a workflow when the parts are truly separate and the job is big. For one file, just ask.

And all this still needs you to watch. What if Claude could warn you when something goes wrong? That is chapter 13.

Quick reference

The prompts from this chapter, ready to copy: every prompt, chapter 12.

Command or keyWhat it doesUse it when
/config, then type workflowShows the workflow settings: on or off, and the sizeBefore your first workflow, or to make them smaller
Use a workflow: …Asks Claude to split the job across several agentsThe job splits into parts that do not depend on each other
/workflowsShows the running workflow and each agent's tokensYou want to watch, pause or stop a workflow
x / p in /workflowsStops or pauses the selected agentAn agent is stuck or costing too much
s in /workflowsSaves the workflow to .claude/workflows/You will want to run the same job again

References

Where each command and file on this page comes from. Every screenshot is from our own recording on 29 Oct 2026, Claude Code 2.1.312.

  1. Anthropic · Claude Code settings Where /config settings live, and project files under .claude/. https://code.claude.com/docs/en/settings
  2. Anthropic · Manage costs effectively Why many agents mean many tokens, and how to keep an eye on them. https://code.claude.com/docs/en/costs
  3. My own recording · 29 Oct 2026, Windows 11 The scan finished in 24 s with 4 agents and 44.2k tokens; streak.js came back with no findings, which Claude marked as unconfirmed.