<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/">
  <channel>
    <title>Subagents · Jared Lynskey</title>
    <link>https://jared.lynskey.co.nz/en/tags/subagents/</link>
    <description>Short stories of value on software engineering and engineering leadership — performance reviews, hiring and scaling teams, CI/CD, DevOps monitoring and agentic AI. Written from Seoul.</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>© 2026 Jared Lynskey</copyright>
    <lastBuildDate>Mon, 23 Nov 2026 00:00:00 +1300</lastBuildDate>
    <atom:link href="https://jared.lynskey.co.nz/en/tags/subagents/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>What Is Ultracode in Claude Code? Workflows, Cost and When to Use It</title>
      <link>https://jared.lynskey.co.nz/en/posts/2026/claude-code-ultracode/</link>
      <guid isPermaLink="true">https://jared.lynskey.co.nz/en/posts/2026/claude-code-ultracode/</guid>
      <pubDate>Mon, 23 Nov 2026 00:00:00 +1300</pubDate>
      <dc:creator>Jared Lynskey</dc:creator>
      <category>Claude Code</category>
      <category>AI Agents</category>
      <category>Ultracode</category>
      <category>Workflows</category>
      <category>Subagents</category>
      <category>Developer Tools</category>
      <description>Ultracode makes Claude Code plan a multi-agent workflow for each task. I ran one small job three ways: $1.37 by default, $25.54 with ultracode on.</description>
      <content:encoded><![CDATA[<p>Ultracode is a setting in Claude Code that makes Claude plan a dynamic workflow for each substantial task. A workflow is a JavaScript script that Claude writes on the spot. It starts many subagents in the background, passes results from one stage to the next, and hands the main session a summary at the end. Ultracode is not a different model and not a higher effort level. You turn it on for the session with <code>/effort ultracode</code>, or for one task by putting the word <code>ultracode</code> in your prompt. It costs far more than a normal request: the same small job cost me $1.37 without it and $25.54 with it.</p>
<p>I tested this on Claude Code 2.1.330 with Fable 5.2. An unrelated interview-assistant product has the same name; this post is about the Claude Code setting.</p>

<h2 class="relative group">What is ultracode in Claude Code?
    <div id="what-is-ultracode-in-claude-code" class="anchor"></div>
    
    <span
        class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
        <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#what-is-ultracode-in-claude-code" aria-label="Anchor">#</a>
    </span>
    
</h2>
<p><a href="https://code.claude.com/docs/en/workflows"  target="_blank" rel="noreferrer">The workflows page in the docs</a> puts it in one sentence: &ldquo;Ultracode is a Claude Code setting that turns on automatic workflow orchestration for the session, at whichever effort level the session runs at.&rdquo; With it on, Claude plans a workflow for each substantive task, and one request can turn into several workflows in a row.</p>
<p>The workflow is what&rsquo;s new. With subagents, the main conversation decides turn by turn what to hand out and reads every result into its own context. With a workflow, that loop is written down as code: the script says which agents run, in what order and with what prompts, and their intermediate results stay in the script&rsquo;s variables. The runtime executes it in the background while your session stays free.</p>
<p>Three things with similar names are different features:</p>
<ul>
<li><strong>Effort levels</strong> (<code>low</code> to <code>max</code>) set how much the model thinks. Since v2.1.284, <code>/effort ultracode</code> leaves the effort level where it was. Only the launch flag changes it, as the next section shows.</li>
<li><strong><code>ultrathink</code></strong> is a keyword that raises thinking for one turn. It starts no agents.</li>
<li><strong><code>/code-review ultra</code></strong> is a multi-agent code review that runs in the cloud and is billed separately.</li>
</ul>

<h2 class="relative group">How to turn ultracode on and off
    <div id="how-to-turn-ultracode-on-and-off" class="anchor"></div>
    
    <span
        class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
        <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#how-to-turn-ultracode-on-and-off" aria-label="Anchor">#</a>
    </span>
    
</h2>
<table>
	<thead>
			<tr>
					<th>Scope</th>
					<th>How</th>
					<th>Notes</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>One task</td>
					<td>Put <code>ultracode</code> in the prompt</td>
					<td>The session setting does not change</td>
			</tr>
			<tr>
					<td>This session</td>
					<td><code>/effort ultracode</code>, and <code>/effort ultracode off</code> to stop</td>
					<td>Effort level unchanged</td>
			</tr>
			<tr>
					<td>From launch</td>
					<td><code>claude --effort ultracode</code></td>
					<td>Also sets effort to <code>xhigh</code></td>
			</tr>
			<tr>
					<td>Always</td>
					<td><code>&quot;ultracode&quot;: true</code> in <code>settings.json</code></td>
					<td>On for every session until you remove it</td>
			</tr>
	</tbody>
</table>
<p>Workflows are on all paid plans, the API, and the cloud providers. On Pro you first turn on the Dynamic workflows row in <code>/config</code>.</p>
<p>Two limits apply. A run may use up to 16 agents at once and 1,000 in total. Then there is a size guideline, which is advice to Claude and not a cap: <code>small</code> is fewer than 5 agents, <code>medium</code> fewer than 10, <code>large</code> fewer than 50, and <code>unrestricted</code> leaves it to Claude. The default is <code>medium</code>, or <code>small</code> on Pro.</p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">/config workflowSizeGuideline=small</span></span></code></pre></div></div>
<p>While a workflow runs, <code>/workflows</code> opens its progress view. There <code>p</code> pauses or resumes the run, <code>x</code> stops the selected agent or the whole run, <code>r</code> restarts an agent, and <code>s</code> saves the script as a command you can run again. Saved ones go to <code>.claude/workflows/</code> in the project or <code>~/.claude/workflows/</code> for all projects.</p>

<h2 class="relative group">What does a workflow script look like?
    <div id="what-does-a-workflow-script-look-like" class="anchor"></div>
    
    <span
        class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
        <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#what-does-a-workflow-script-look-like" aria-label="Anchor">#</a>
    </span>
    
</h2>
<p>In my test Claude wrote a script of about 15,700 characters, most of it prompts. Its skeleton looked like this (shortened, with the prompts cut out):</p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-js" data-lang="js"><span class="line"><span class="cl"><span class="kr">export</span> <span class="kr">const</span> <span class="nx">meta</span> <span class="o">=</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="nx">name</span><span class="o">:</span> <span class="s1">&#39;tests-and-fixes&#39;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="nx">description</span><span class="o">:</span> <span class="s1">&#39;Write tests for each module, fix what they find, then review&#39;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="nx">phases</span><span class="o">:</span> <span class="p">[{</span> <span class="nx">title</span><span class="o">:</span> <span class="s1">&#39;Test &amp; fix&#39;</span> <span class="p">},</span> <span class="p">{</span> <span class="nx">title</span><span class="o">:</span> <span class="s1">&#39;Review&#39;</span> <span class="p">}],</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">MODULES</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;isbn&#39;</span><span class="p">,</span> <span class="s1">&#39;dates&#39;</span><span class="p">,</span> <span class="s1">&#39;fines&#39;</span><span class="p">,</span> <span class="s1">&#39;loans&#39;</span><span class="p">,</span> <span class="s1">&#39;catalog&#39;</span><span class="p">,</span> <span class="s1">&#39;report&#39;</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">LENSES</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;spec-coverage&#39;</span><span class="p">,</span> <span class="s1">&#39;edge-case-bugs&#39;</span><span class="p">,</span> <span class="s1">&#39;mutation-check&#39;</span><span class="p">]</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nx">phase</span><span class="p">(</span><span class="s1">&#39;Test &amp; fix&#39;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">results</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">pipeline</span><span class="p">(</span><span class="nx">MODULES</span><span class="p">,</span> <span class="nx">name</span> <span class="p">=&gt;</span>
</span></span><span class="line"><span class="cl">  <span class="nx">agent</span><span class="p">(</span><span class="nx">testAndFixPrompt</span><span class="p">(</span><span class="nx">name</span><span class="p">),</span> <span class="p">{</span> <span class="nx">label</span><span class="o">:</span> <span class="sb">`test+fix:</span><span class="si">${</span><span class="nx">name</span><span class="si">}</span><span class="sb">`</span><span class="p">,</span> <span class="nx">schema</span><span class="o">:</span> <span class="nx">RESULT_SCHEMA</span> <span class="p">}),</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nx">phase</span><span class="p">(</span><span class="s1">&#39;Review&#39;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">reviews</span> <span class="o">=</span> <span class="kr">await</span> <span class="nx">parallel</span><span class="p">(</span><span class="nx">LENSES</span><span class="p">.</span><span class="nx">map</span><span class="p">(</span><span class="nx">lens</span> <span class="p">=&gt;</span> <span class="p">()</span> <span class="p">=&gt;</span>
</span></span><span class="line"><span class="cl">  <span class="nx">agent</span><span class="p">(</span><span class="nx">reviewPrompt</span><span class="p">(</span><span class="nx">lens</span><span class="p">,</span> <span class="nx">results</span><span class="p">),</span> <span class="p">{</span> <span class="nx">label</span><span class="o">:</span> <span class="sb">`review:</span><span class="si">${</span><span class="nx">lens</span><span class="si">}</span><span class="sb">`</span><span class="p">,</span> <span class="nx">schema</span><span class="o">:</span> <span class="nx">FINDINGS_SCHEMA</span> <span class="p">}),</span>
</span></span><span class="line"><span class="cl"><span class="p">))</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">return</span> <span class="p">{</span> <span class="nx">results</span><span class="p">,</span> <span class="nx">reviews</span> <span class="p">}</span></span></span></code></pre></div></div>
<p>So there were nine agents in two phases: one per module to write tests and fix that module, then three read-only reviewers looking at the whole thing from different angles. Each agent returns structured output that matches a schema, which is how the script can pass the first phase&rsquo;s results into the reviewers&rsquo; prompts.</p>

<h2 class="relative group">The test: one small job, three ways
    <div id="the-test-one-small-job-three-ways" class="anchor"></div>
    
    <span
        class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
        <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-test-one-small-job-three-ways" aria-label="Anchor">#</a>
    </span>
    
</h2>
<p>I made a throwaway Python library of six small modules, about 100 lines in all, with one planted bug in each and a README that states the intended behaviour. It had no tests. The prompt was the same each time: write pytest tests for every module, run them, fix whatever bugs they reveal, and report.</p>
<p>I ran it three times with <code>claude -p</code>, each on a fresh copy and with the same permission rules: once with my usual settings (Fable 5.2 at medium effort), once with <code>--effort xhigh</code>, and once with <code>--effort ultracode</code>. A checker the agents never saw had one assertion per planted bug.</p>
<table>
	<thead>
			<tr>
					<th></th>
					<th>Default (medium)</th>
					<th><code>--effort xhigh</code></th>
					<th><code>--effort ultracode</code></th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>Time</td>
					<td>2 min 48 s</td>
					<td>5 min 3 s</td>
					<td>27 min, in two goes</td>
			</tr>
			<tr>
					<td>Cost at list prices</td>
					<td>$1.37</td>
					<td>$2.24</td>
					<td>$25.54</td>
			</tr>
			<tr>
					<td>Agents</td>
					<td>1</td>
					<td>1</td>
					<td>9, plus the main session</td>
			</tr>
			<tr>
					<td>Output tokens</td>
					<td>17,828</td>
					<td>31,103</td>
					<td>404,026</td>
			</tr>
			<tr>
					<td>Planted bugs fixed</td>
					<td>6 of 6</td>
					<td>6 of 6</td>
					<td>6 of 6</td>
			</tr>
			<tr>
					<td>Tests written</td>
					<td>310</td>
					<td>145</td>
					<td>485</td>
			</tr>
	</tbody>
</table>
<p>I&rsquo;m on a Max plan, so none of this was billed. The dollar figures are what Claude Code reports at API list prices; on a subscription the same work comes out of your usage limits.</p>
<p>All three runs fixed all six bugs. The default run also caught a crash the README never mentioned. Ultracode cost about 19 times as much and took about 10 times as long to reach the same fixes.</p>
<p>What the extra money bought was checking. The main session spent 2 minutes 16 seconds planning before it started anything. The six module agents then ran in parallel and finished in two to five and a half minutes each, at 37,000 to 54,000 tokens apiece. The three reviewers were the expensive part: ten to twelve minutes and 99,000 to 130,000 tokens each. The run ended with a mutation check, in which the fixed code was broken in 24 different ways, one line at a time, to confirm the tests noticed. They did, except for one change that makes no difference to any result. The final report also listed three behaviours the README leaves open, where the code was left as it was.</p>
<p>That&rsquo;s worth having on code that matters. On a job this size it&rsquo;s a lot to pay for confidence in six one-line fixes. This was also one run of each on a tiny repository, so read the ratios as rough.</p>

<h2 class="relative group">Ultracode in headless mode stops after 10 minutes
    <div id="ultracode-in-headless-mode-stops-after-10-minutes" class="anchor"></div>
    
    <span
        class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
        <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#ultracode-in-headless-mode-stops-after-10-minutes" aria-label="Anchor">#</a>
    </span>
    
</h2>
<p>The docs say the typed keyword does not start a workflow when the prompt arrives through <code>claude -p</code>. The launch flag does. <code>claude -p --effort ultracode</code> started a workflow for me, as long as the <code>Workflow</code> tool had a permission rule allowing it.</p>
<p>Then it went wrong in an instructive way. The main session launched the workflow and ended its turn with &ldquo;The workflow is running&rdquo;. In headless mode, Claude Code waits for background work for 10 idle minutes, then stops it and drops the partial result. My workflow needed longer. The three reviewers were killed mid-run, $13.52 had been spent, and the &ldquo;result&rdquo; the command printed was that one sentence about the workflow running.</p>
<p>The <a href="https://code.claude.com/docs/en/headless"  target="_blank" rel="noreferrer">headless page</a> documents the fix: set <code>CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS</code>, or set it to <code>0</code> to wait without a cap.</p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nv">CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS</span><span class="o">=</span><span class="m">0</span> claude -p <span class="s2">&#34;add tests for every module and fix what they find&#34;</span> <span class="se">\
</span></span></span><span class="line"><span class="cl">  --effort ultracode <span class="se">\
</span></span></span><span class="line"><span class="cl">  --permission-mode acceptEdits <span class="se">\
</span></span></span><span class="line"><span class="cl">  --allowedTools <span class="s2">&#34;Workflow&#34;</span> <span class="s2">&#34;Read&#34;</span> <span class="s2">&#34;Edit&#34;</span> <span class="s2">&#34;Write&#34;</span> <span class="s2">&#34;Bash(python3 -m pytest:*)&#34;</span> <span class="se">\
</span></span></span><span class="line"><span class="cl">  --max-budget-usd <span class="m">20</span> <span class="se">\
</span></span></span><span class="line"><span class="cl">  --output-format json</span></span></code></pre></div></div>
<p>Resuming worked as documented. I resumed the session with <code>--resume</code> and asked Claude to relaunch the same script. The six module agents came back from cache in no time, and only the three reviewers ran again. That second go still cost $12.02, because the reviewers were where the money went.</p>
<p>Two more things from the logs:</p>
<ul>
<li><strong>The agents obey the same permission rules as the main session.</strong> Mine wanted scratch copies of the repository in the system temp folder, and 32 commands were refused across the two goes, against one in each single-session run. They worked around it, but a narrow allow list costs a workflow time.</li>
<li><strong>Read <code>modelUsage</code>, not <code>usage</code>, in the JSON output.</strong> After the first go, <code>usage</code> showed 13,362 output tokens, which was the main session alone. <code>modelUsage</code> showed 211,120, which included the agents. <code>total_cost_usd</code> includes them too.</li>
</ul>

<h2 class="relative group">When is ultracode worth it?
    <div id="when-is-ultracode-worth-it" class="anchor"></div>
    
    <span
        class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
        <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#when-is-ultracode-worth-it" aria-label="Anchor">#</a>
    </span>
    
</h2>
<p>The docs say to reach for a workflow &ldquo;when a task needs more agents than one conversation can coordinate, or when you want the orchestration codified as a script you can read and rerun&rdquo;. They also warn that with ultracode on, each request uses more tokens and takes longer, and they suggest running a workflow on a small slice first: one directory, not the whole repository.</p>
<p>My test shows why. Every agent starts cold and reads the code for itself, so there is a floor under the cost however small the job is, and the review stage costs more than the work it reviews. That overhead pays off when the job is wide: a migration across hundreds of files, an audit of a whole codebase, tests for a large package that has none. It also pays when being wrong is expensive and you want independent checks. It doesn&rsquo;t pay for a bug fix, a small feature, or anything one session finishes in a few minutes.</p>
<p>So I&rsquo;d leave the session setting off and use the keyword. Put <code>ultracode</code> in the one prompt that deserves it, set the size guideline to <code>small</code> until you know what a run costs you, and give headless runs a budget cap and no time ceiling.</p>

<h2 class="relative group">The short version
    <div id="the-short-version" class="anchor"></div>
    
    <span
        class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
        <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-short-version" aria-label="Anchor">#</a>
    </span>
    
</h2>
<p>Ultracode makes Claude Code write and run a multi-agent workflow script for each substantial task. Turn it on per task with the <code>ultracode</code> keyword, per session with <code>/effort ultracode</code>, or at launch with <code>claude --effort ultracode</code>, which also raises effort to <code>xhigh</code>. On a six-module test it fixed the same six bugs as a default run, at about 19 times the cost and 10 times the time, and added a mutation check and a list of open questions. In headless mode, set <code>CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS=0</code> or the run is stopped after 10 idle minutes.</p>

<h2 class="relative group">Further reading
    <div id="further-reading" class="anchor"></div>
    
    <span
        class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none">
        <a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#further-reading" aria-label="Anchor">#</a>
    </span>
    
</h2>
<p><strong>On this site:</strong></p>
<ul>
<li><a href="https://jared.lynskey.co.nz/en/posts/2026/claude-code-git-worktrees/" >Claude Code Worktrees: Running Parallel Agents Without Collisions</a>, for keeping parallel agents out of each other&rsquo;s files</li>
<li><a href="https://jared.lynskey.co.nz/en/posts/2026/2026-10-22-claude-code-day-to-day/" >How I Run Claude Code Day to Day: tmux, Permission Modes and My Phone</a>, on the setup these runs sit in</li>
<li><a href="https://jared.lynskey.co.nz/en/posts/2026/2026-10-22-agentic-ai-security/" >Agentic AI Security: What My Agents Can Reach, and Who Gets to Tell Them What to Do</a>, on what nine agents with your permissions can touch</li>
</ul>
<p><strong>Elsewhere:</strong></p>
<ul>
<li><a href="https://code.claude.com/docs/en/workflows"  target="_blank" rel="noreferrer">Dynamic workflows</a> in the Claude Code docs, for the script API, limits and the progress view</li>
<li><a href="https://code.claude.com/docs/en/model-config"  target="_blank" rel="noreferrer">Model configuration</a>, for effort levels and the <code>--effort</code> flag</li>
<li><a href="https://code.claude.com/docs/en/headless"  target="_blank" rel="noreferrer">Run Claude Code programmatically</a>, for <code>claude -p</code> and the background wait</li>
</ul>
]]></content:encoded>
      <media:content url="https://jared.lynskey.co.nz/en/posts/2026/claude-code-ultracode/featured.jpg" medium="image" type="image/jpeg" />
    </item>
  </channel>
</rss>
