<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Atul Joshi</title>
    <description>The latest articles on DEV Community by Atul Joshi (@atul_joshi_f).</description>
    <link>https://dev.to/atul_joshi_f</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3711934%2F4ce57783-401b-45c4-abcb-980e2a4e02fb.jpg</url>
      <title>DEV Community: Atul Joshi</title>
      <link>https://dev.to/atul_joshi_f</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/atul_joshi_f"/>
    <language>en</language>
    <item>
      <title>How not to use sub-agents!</title>
      <dc:creator>Atul Joshi</dc:creator>
      <pubDate>Tue, 25 Aug 2026 12:44:53 +0000</pubDate>
      <link>https://dev.to/atul_joshi_f/how-not-to-use-sub-agents-1p38</link>
      <guid>https://dev.to/atul_joshi_f/how-not-to-use-sub-agents-1p38</guid>
      <description>&lt;h3&gt;
  
  
  What a 500-script migration taught me about when agent parallelism actually makes sense
&lt;/h3&gt;

&lt;p&gt;I recently started working on a migration involving roughly &lt;strong&gt;500 scripts&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The goal was to migrate legacy logging calls to a newly implemented structured logging engine, with unique logging channels for tracing and observability through &lt;strong&gt;Grafana, Loki, Tempo, and Alloy&lt;/strong&gt;. The new logging engine was already implemented and available through a common include path.&lt;/p&gt;

&lt;p&gt;What remained was the tedious part: updating hundreds of existing scripts.&lt;/p&gt;

&lt;p&gt;My first thought was simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"There are 500 files. Why not use 10 sub-agents and finish this faster?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It sounded like a perfect use case for agentic coding.&lt;/p&gt;

&lt;p&gt;It wasn't.&lt;/p&gt;

&lt;p&gt;The problem wasn't the number of files. It was &lt;strong&gt;what I was asking the agents to do&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. The Initial Approach: More Agents = More Speed?
&lt;/h2&gt;

&lt;p&gt;The idea was to divide the files into batches and give each batch to a mini-model.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                    Main Agent
                        │
          ┌─────────────┼─────────────┐
          ▼             ▼             ▼
       Agent 1       Agent 2       Agent 3
       50 files      50 files      50 files
          │             │             │
          └─────────────┼─────────────┘
                        ▼
                    Migration
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each agent received essentially the same instructions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;find legacy logging&lt;/li&gt;
&lt;li&gt;replace it with the new structured logger&lt;/li&gt;
&lt;li&gt;use the correct channel&lt;/li&gt;
&lt;li&gt;preserve business logic&lt;/li&gt;
&lt;li&gt;complete its assigned files&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The files were independent, so the approach looked reasonable.&lt;/p&gt;

&lt;p&gt;But each agent was doing much more than the actual migration.&lt;/p&gt;

&lt;p&gt;It was also rediscovering the repository, figuring out what needed changing, deciding channel names, and keeping track of its own progress.&lt;/p&gt;

&lt;p&gt;That repeated work became the real cost.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. What Actually Happened
&lt;/h2&gt;

&lt;p&gt;The problems were not primarily with the code changes. They were with the work surrounding them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Problem 1: Tracking completed work
&lt;/h3&gt;

&lt;p&gt;With multiple agents, someone needs to know:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;which files are pending&lt;/li&gt;
&lt;li&gt;which are being processed&lt;/li&gt;
&lt;li&gt;which are completed&lt;/li&gt;
&lt;li&gt;which failed&lt;/li&gt;
&lt;li&gt;which should be skipped&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is workflow state.&lt;/p&gt;

&lt;p&gt;A JSON file, database, or task queue is designed for this. An LLM context isn't.&lt;/p&gt;




&lt;h3&gt;
  
  
  Problem 2: Finding what actually needs to change
&lt;/h3&gt;

&lt;p&gt;Each agent had to discover the logging statements itself.&lt;/p&gt;

&lt;p&gt;The process looked something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Open file
    ↓
Understand file
    ↓
Search for logging
    ↓
Find legacy calls
    ↓
Inspect context
    ↓
Decide what to change
    ↓
Perform migration
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But if a simple command can already tell us:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ExampleScript.py:42
ExampleScript.py:87
ExampleScript.py:131
ExampleScript.py:164
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;there is little value in asking ten different model contexts to discover those same locations.&lt;/p&gt;

&lt;p&gt;That is a job for tooling.&lt;/p&gt;




&lt;h3&gt;
  
  
  Problem 3: Channel generation consumed reasoning
&lt;/h3&gt;

&lt;p&gt;Each script needed a unique channel.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ExampleScript.py
        ↓
example_channel
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This was another decision I had unnecessarily delegated to the model.&lt;/p&gt;

&lt;p&gt;Channel generation can be deterministic:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;file path
    ↓
channel generator
    ↓
validated channel map
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once generated, the channel can simply be given to the model.&lt;/p&gt;

&lt;p&gt;No need to make the model reconsider naming conventions and uniqueness for every file.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. The Important Distinction: Work vs. Reasoning
&lt;/h2&gt;

&lt;p&gt;This was the point where my thinking changed.&lt;/p&gt;

&lt;p&gt;I initially saw:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;500 independent files&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But that doesn't necessarily mean:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;500 independent reasoning problems.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Those are different things.&lt;/p&gt;

&lt;p&gt;The migration itself was mostly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Find legacy logging
        ↓
Replace with known API
        ↓
Use known channel
        ↓
Preserve everything else
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The work was repeated hundreds of times, but the reasoning was mostly the same.&lt;/p&gt;

&lt;p&gt;Now compare that with a debugging problem:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Why did API latency increase?

    ├── Database?
    ├── Cache?
    ├── Network?
    ├── AWS infrastructure?
    └── Application code?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Those are genuinely different reasoning paths.&lt;/p&gt;

&lt;p&gt;That is where sub-agents become useful:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                  Problem
                     │
          ┌──────────┼──────────┐
          ▼          ▼          ▼
       Agent A    Agent B    Agent C
       Database   Network    Application
          │          │          │
          └──────────┼──────────┘
                     ▼
                 Synthesis
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each agent can investigate a substantial hypothesis independently.&lt;/p&gt;

&lt;p&gt;That is meaningful parallelism.&lt;/p&gt;

&lt;p&gt;In my migration, I was parallelizing &lt;strong&gt;work&lt;/strong&gt;, not &lt;strong&gt;reasoning&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. The Better Approach: Remove Decisions Before Calling the Model
&lt;/h2&gt;

&lt;p&gt;The obvious improvement was to move deterministic work outside the model.&lt;/p&gt;

&lt;p&gt;Instead of asking agents to discover everything, preprocess the repository first.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                     Repository
                         │
                         ▼
                   Preprocessing
                         │
          ┌──────────────┼──────────────┐
          ▼              ▼              ▼
       Inventory     Log locations   Channel map
          │              │              │
          └──────────────┼──────────────┘
                         ▼
                     index.json
                         │
                         ▼
                  Single Claude Code
                         │
                         ▼
                     Migration
                         │
                         ▼
                    Verification
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The preprocessing stage determines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;which files contain legacy logging&lt;/li&gt;
&lt;li&gt;which files contain no logging&lt;/li&gt;
&lt;li&gt;where the legacy calls are&lt;/li&gt;
&lt;li&gt;what channel belongs to each file&lt;/li&gt;
&lt;li&gt;what has already been completed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"file"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ExampleScript.py"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"pending"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"legacy_log_count"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"channel"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"example_channel"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the model doesn't need to discover the problem.&lt;/p&gt;

&lt;p&gt;It receives the problem.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. The Model's Task Becomes Much Smaller
&lt;/h2&gt;

&lt;p&gt;Instead of:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Explore the repository and migrate this file.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;the model can receive:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;File:
ExampleScript.py

Channel:
example_channel

Legacy logging locations:
47
82
119
153

Expected migrations:
4

Task:
Replace the identified legacy logging statements
with the structured logging implementation.

Do not modify business logic.
Do not change the assigned channel.
Do not modify unrelated code.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The model now focuses on the part that actually benefits from reasoning:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;How should this existing logging statement be expressed using the new API while preserving its meaning?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Everything else has already been established.&lt;/p&gt;

&lt;p&gt;This is a much better task boundary.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Why the Single Session Is Better Here
&lt;/h2&gt;

&lt;p&gt;For this migration, a single Claude Code session has some simple advantages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;one shared migration context&lt;/li&gt;
&lt;li&gt;no duplicated instructions&lt;/li&gt;
&lt;li&gt;no inter-agent coordination&lt;/li&gt;
&lt;li&gt;external state for progress&lt;/li&gt;
&lt;li&gt;deterministic tools for deterministic work&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The workflow becomes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                    index.json
                        │
                        ▼
                 Next pending file
                        │
                        ▼
                Prepare file context
                        │
                        ├── locations
                        ├── channel
                        └── rules
                        │
                        ▼
                 Single agent
                        │
                        ▼
                   Verification
                        │
                  ┌─────┴─────┐
                  ▼           ▼
                 PASS        FAIL
                  │           │
                  ▼           ▼
              completed     review
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This isn't less sophisticated than a multi-agent system.&lt;/p&gt;

&lt;p&gt;It's simply better matched to the problem.&lt;/p&gt;




&lt;h2&gt;
  
  
  7. So When Are Sub-Agents Actually Useful?
&lt;/h2&gt;

&lt;p&gt;The experience led to a better question.&lt;/p&gt;

&lt;p&gt;Instead of asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"How many tasks do I have?"&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"How many independent reasoning problems do I have?"&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That distinction makes the useful cases much clearer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Independent research
&lt;/h3&gt;

&lt;p&gt;For an architectural investigation, different agents can explore different areas:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Agent A → AWS architecture
Agent B → database architecture
Agent C → observability
Agent D → security
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The main agent can then combine the findings.&lt;/p&gt;

&lt;h3&gt;
  
  
  Competing debugging hypotheses
&lt;/h3&gt;

&lt;p&gt;For a performance problem:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                 Performance issue
                        │
           ┌────────────┼────────────┐
           ▼            ▼            ▼
       Database       Network     Application
       hypothesis     hypothesis   hypothesis
           │            │            │
           └────────────┼────────────┘
                        ▼
                    Synthesis
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each agent investigates a different explanation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Independent code reviews
&lt;/h3&gt;

&lt;p&gt;A change can be reviewed from different perspectives:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Agent A → correctness
Agent B → security
Agent C → performance
Agent D → maintainability
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These agents aren't simply doing the same job. Each has a different analytical objective.&lt;/p&gt;

&lt;h3&gt;
  
  
  Independent feature implementation
&lt;/h3&gt;

&lt;p&gt;If a system has clearly separated components:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;API
Worker
Infrastructure
Observability
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and their interfaces are already defined, separate agents can work independently.&lt;/p&gt;

&lt;p&gt;The important condition is &lt;strong&gt;low coupling&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. The Cost of Sub-Agents
&lt;/h2&gt;

&lt;p&gt;Sub-agents aren't free parallel threads.&lt;/p&gt;

&lt;p&gt;Every additional agent brings its own:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;context&lt;/li&gt;
&lt;li&gt;instructions&lt;/li&gt;
&lt;li&gt;tool calls&lt;/li&gt;
&lt;li&gt;reasoning&lt;/li&gt;
&lt;li&gt;coordination&lt;/li&gt;
&lt;li&gt;result synthesis&lt;/li&gt;
&lt;li&gt;failure handling&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Conceptually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Single agent:

shared context
+
sequential reasoning


N agents:

N × context
+
N × reasoning
+
coordination
+
synthesis
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So parallelism only helps when the reasoning saved is greater than the overhead introduced.&lt;/p&gt;

&lt;p&gt;A useful way to think about it is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Sub-agent benefit = parallel reasoning saved - duplicated context
    - coordination cost - synthesis cost
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the difference is small, adding agents is mostly adding machinery.&lt;/p&gt;




&lt;h2&gt;
  
  
  9. A Practical Decision Framework
&lt;/h2&gt;

&lt;p&gt;Before creating a sub-agent, ask:&lt;/p&gt;

&lt;h3&gt;
  
  
  Is the task deterministic?
&lt;/h3&gt;

&lt;p&gt;If yes:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use a script or tool.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Does it require substantial reasoning?
&lt;/h3&gt;

&lt;p&gt;If no:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A single agent is usually enough.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Is the reasoning independent?
&lt;/h3&gt;

&lt;p&gt;If no:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Keep it in one session.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Would a fresh context provide meaningful value?
&lt;/h3&gt;

&lt;p&gt;If yes:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A sub-agent may be worthwhile.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A simple decision tree:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                 Is it deterministic?
                       │
                 ┌─────┴─────┐
                YES          NO
                 │            │
               TOOL      Substantial
                         reasoning?
                            │
                       ┌────┴────┐
                      NO        YES
                       │          │
                 SINGLE AGENT   Independent?
                                  │
                            ┌─────┴─────┐
                           NO          YES
                            │            │
                       SINGLE       SUB-AGENTS
                       SESSION
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  10. What I Learned From the 500-File Migration
&lt;/h2&gt;

&lt;p&gt;The migration changed how I think about agent orchestration.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The number of files doesn't determine the number of agents.
&lt;/h3&gt;

&lt;p&gt;Five hundred files can still represent one reasoning pattern.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Context is a resource.
&lt;/h3&gt;

&lt;p&gt;Duplicating the same context across ten agents has a cost.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Preprocessing can be more valuable than parallelism.
&lt;/h3&gt;

&lt;p&gt;Finding the relevant information before invoking the model can save more effort than adding more workers.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. External state beats model memory.
&lt;/h3&gt;

&lt;p&gt;A model shouldn't have to remember the status of hundreds of files.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Deterministic decisions belong outside the LLM.
&lt;/h3&gt;

&lt;p&gt;Channel generation, classification, searches, counts, and validation can be automated.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Agent orchestration has a cost.
&lt;/h3&gt;

&lt;p&gt;More agents do not automatically mean faster or cheaper execution.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Agents are best used for reasoning.
&lt;/h3&gt;

&lt;p&gt;Not bookkeeping.&lt;/p&gt;

&lt;p&gt;Not counting.&lt;/p&gt;

&lt;p&gt;Not maintaining workflow state.&lt;/p&gt;

&lt;p&gt;Not performing searches that a deterministic tool can perform more reliably.&lt;/p&gt;




&lt;h2&gt;
  
  
  11. The General Principle
&lt;/h2&gt;

&lt;p&gt;The biggest lesson wasn't:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Don't use sub-agents."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It was:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Don't parallelize merely because work can be divided. Parallelize when reasoning can be divided.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A hundred deterministic transformations may be better handled by a script.&lt;/p&gt;

&lt;p&gt;A hundred small reasoning tasks may still be better handled by one well-contextualized agent.&lt;/p&gt;

&lt;p&gt;Five difficult, independent investigations may be perfect for five sub-agents.&lt;/p&gt;

&lt;p&gt;The number of tasks is only one part of the problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The structure of the reasoning should determine the architecture.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;My initial assumption was:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;500 files
    ↓
many agents
    ↓
faster migration
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The better approach turned out to be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;500 files
    ↓
deterministic preprocessing
    ↓
external state
    ↓
bounded context
    ↓
single agent
    ↓
deterministic verification
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The lesson is not that sub-agents are bad. It's that &lt;strong&gt;parallelism should have a reason&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Before spawning another agent, ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Where is the independent reasoning?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If there isn't much, more agents may simply mean more context, more tokens, more coordination, and more things to clean up afterward.&lt;/p&gt;

&lt;p&gt;Use sub-agents when they let you explore &lt;strong&gt;different substantial reasoning paths at the same time&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Otherwise, fewer agents with better boundaries usually win.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>automation</category>
      <category>agents</category>
    </item>
  </channel>
</rss>
