<?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: Mahad Ansar</title>
    <description>The latest articles on DEV Community by Mahad Ansar (@mahadansar).</description>
    <link>https://dev.to/mahadansar</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%2F4078593%2Fbfe6541c-8ffa-458e-810a-f56769dcb130.jpg</url>
      <title>DEV Community: Mahad Ansar</title>
      <link>https://dev.to/mahadansar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mahadansar"/>
    <language>en</language>
    <item>
      <title>I Built a Multi-Agent Coding Orchestrator. It Kept Choosing Zero Workers.</title>
      <dc:creator>Mahad Ansar</dc:creator>
      <pubDate>Sat, 15 Aug 2026 07:47:40 +0000</pubDate>
      <link>https://dev.to/mahadansar/i-built-a-multi-agent-coding-orchestrator-it-kept-choosing-zero-workers-4bc3</link>
      <guid>https://dev.to/mahadansar/i-built-a-multi-agent-coding-orchestrator-it-kept-choosing-zero-workers-4bc3</guid>
      <description>&lt;p&gt;I expected more AI agents to make coding faster.&lt;/p&gt;

&lt;p&gt;They didn’t.&lt;/p&gt;

&lt;p&gt;That was not the result I was looking for, but it ended up being the most interesting result of the project.&lt;/p&gt;

&lt;p&gt;Over the past few weeks, I have been building &lt;strong&gt;Sol-Luna Orchestrator&lt;/strong&gt;, an open-source orchestration layer for OpenAI Codex.&lt;/p&gt;

&lt;p&gt;The idea started with a simple question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What if one strong AI could decide when it actually needed help from other AI agents?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Instead of automatically splitting every coding task across multiple workers, I wanted the supervisor to look at the work first and decide whether delegation was actually worth the coordination cost.&lt;/p&gt;

&lt;p&gt;That distinction ended up mattering much more than I expected.&lt;/p&gt;

&lt;h2&gt;
  
  
  The basic idea
&lt;/h2&gt;

&lt;p&gt;Sol-Luna has two roles.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GPT-5.6 Sol&lt;/strong&gt; acts as the supervisor. It owns the overall task, decomposition, verification, and final review.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GPT-5.6 Luna&lt;/strong&gt; instances act as bounded workers when Sol decides delegation is useful.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Task
  |
  v
Sol Supervisor
  |
Should I delegate?
   /          \
 No            Yes
 |              |
Sol          Split into
handles       bounded tasks
the work          |
              Choose worker
                 effort
                  |
           Luna  Luna  Luna
                  |
               Results
                  |
            Sol verifies
             and reviews
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;There are really &lt;strong&gt;two separate adaptive decisions&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Adaptive delegation
&lt;/h3&gt;

&lt;p&gt;Sol decides whether to delegate at all.&lt;/p&gt;

&lt;p&gt;The optimal worker count is allowed to be zero.&lt;/p&gt;

&lt;p&gt;Small tasks, tightly coupled work, or tasks where coordination looks more expensive than simply doing the work can stay entirely with Sol.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Adaptive worker effort
&lt;/h3&gt;

&lt;p&gt;If Sol does delegate, it separately decides how much reasoning effort each Luna worker needs.&lt;/p&gt;

&lt;p&gt;A worker can receive:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Medium&lt;/li&gt;
&lt;li&gt;High&lt;/li&gt;
&lt;li&gt;XHigh&lt;/li&gt;
&lt;li&gt;Max&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A mechanical change does not necessarily need the same reasoning budget as a difficult debugging problem.&lt;/p&gt;

&lt;p&gt;So the goal was never simply to spawn more agents.&lt;/p&gt;

&lt;p&gt;The goal was to let the strongest model decide how the work should be executed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Making delegation safer
&lt;/h2&gt;

&lt;p&gt;Once multiple coding agents start working at the same time, practical problems appear pretty quickly.&lt;/p&gt;

&lt;p&gt;Workers can edit overlapping files. A worker can move outside its declared task scope. Verification can disagree with what the worker reports. Parallel Git operations can interfere with each other.&lt;/p&gt;

&lt;p&gt;Sol-Luna adds controls around those problems.&lt;/p&gt;

&lt;p&gt;Parallel workers run in isolated Git worktrees. Tasks declare their intended file scope, and scope violations are checked after execution. Verification is independently rerun instead of trusting a worker’s own PASS result. Sol remains responsible for reviewing the final output.&lt;/p&gt;

&lt;p&gt;Workers also cannot recursively invoke the orchestrator and create their own worker trees.&lt;/p&gt;

&lt;p&gt;That gave me a functioning orchestration system.&lt;/p&gt;

&lt;p&gt;But I still had a more basic question.&lt;/p&gt;

&lt;h2&gt;
  
  
  When does parallelism actually become faster?
&lt;/h2&gt;

&lt;p&gt;My earlier benchmarks had already shown that parallel Luna workers could beat &lt;strong&gt;sequential&lt;/strong&gt; Luna delegation.&lt;/p&gt;

&lt;p&gt;But one Sol working alone was still faster.&lt;/p&gt;

&lt;p&gt;For small tasks, that made sense. Delegation itself has overhead.&lt;/p&gt;

&lt;p&gt;So I assumed there must be a break-even point.&lt;/p&gt;

&lt;p&gt;Make the task large enough. Give workers genuinely independent modules. Eventually multiple agents working at the same time should catch up and win.&lt;/p&gt;

&lt;p&gt;That became the next experiment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Looking for the crossover
&lt;/h2&gt;

&lt;p&gt;I created progressively larger deterministic engineering fixtures.&lt;/p&gt;

&lt;p&gt;The important part was that the parallel workloads were deliberately designed with independent streams of work.&lt;/p&gt;

&lt;p&gt;I did not want to give parallel agents an artificially coupled task and then conclude that parallelism was bad.&lt;/p&gt;

&lt;p&gt;The larger benchmark included:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a four-module independent workload&lt;/li&gt;
&lt;li&gt;a six-module independent workload&lt;/li&gt;
&lt;li&gt;a coupled control where decomposition was intentionally inappropriate&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The six-module fixture contained roughly &lt;strong&gt;530 lines of specification and 85 deterministic assertions&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Each module could be worked on independently, so six workers could theoretically make progress at the same time.&lt;/p&gt;

&lt;p&gt;This was deliberately much larger than the earlier fixtures, but it still fit comfortably inside a single Sol session.&lt;/p&gt;

&lt;p&gt;That limitation matters.&lt;/p&gt;

&lt;p&gt;I was testing whether clean parallelism alone was enough to create a crossover. I was not trying to simulate a huge production repository or a task running for several hours.&lt;/p&gt;

&lt;p&gt;For each fixture, I compared three modes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sol working alone
&lt;/h3&gt;

&lt;p&gt;Delegation was disabled.&lt;/p&gt;

&lt;h3&gt;
  
  
  Free choice
&lt;/h3&gt;

&lt;p&gt;Delegation was available, but Sol was free to decide whether to use it.&lt;/p&gt;

&lt;p&gt;This is closest to how I actually want the orchestrator to behave.&lt;/p&gt;

&lt;h3&gt;
  
  
  Forced parallel delegation
&lt;/h3&gt;

&lt;p&gt;Sol was required to delegate the independent work so I could measure what happened when the worker path was definitely used.&lt;/p&gt;

&lt;p&gt;The scale benchmark completed &lt;strong&gt;19 out of 19 runs successfully&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Then came the interesting part.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sol kept choosing zero workers
&lt;/h2&gt;

&lt;p&gt;Across all six free-choice runs, Sol declined to delegate.&lt;/p&gt;

&lt;p&gt;Every time.&lt;/p&gt;

&lt;p&gt;At first, that can sound like an orchestration system refusing to do its job.&lt;/p&gt;

&lt;p&gt;But then I compared those decisions with the forced-delegation results.&lt;/p&gt;

&lt;h3&gt;
  
  
  Four independent modules
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;th&gt;Median&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Sol working alone&lt;/td&gt;
&lt;td&gt;171.5s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Free choice, Sol chose 0 workers&lt;/td&gt;
&lt;td&gt;120s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Forced parallel, 4 workers&lt;/td&gt;
&lt;td&gt;250s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The free-choice runs used &lt;strong&gt;zero Luna workers&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Six independent modules
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;th&gt;Median&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Sol working alone&lt;/td&gt;
&lt;td&gt;189.5s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Free choice, Sol chose 0 workers&lt;/td&gt;
&lt;td&gt;186.5s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Forced parallel, 6 workers&lt;/td&gt;
&lt;td&gt;394.5s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Again, Sol chose &lt;strong&gt;zero workers&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The interesting result was not simply that parallel workers lost.&lt;/p&gt;

&lt;p&gt;The supervisor had been given the option to use them, declined to do so, and none of the measured workloads gave me evidence that this was the wrong call.&lt;/p&gt;

&lt;p&gt;Going from four independent streams to six also did not move forced parallel execution closer to the solo baseline.&lt;/p&gt;

&lt;p&gt;It moved further away.&lt;/p&gt;

&lt;p&gt;Forced parallel was roughly &lt;strong&gt;46% slower&lt;/strong&gt; than solo at four streams and roughly &lt;strong&gt;108% slower&lt;/strong&gt; at six.&lt;/p&gt;

&lt;p&gt;So the benchmark did not find the crossover I expected.&lt;/p&gt;

&lt;h2&gt;
  
  
  More agents were not free
&lt;/h2&gt;

&lt;p&gt;Token usage told a similar story.&lt;/p&gt;

&lt;p&gt;On the independent workloads, forced parallel execution used approximately:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;5.1x&lt;/strong&gt; the known tokens of solo execution at four streams&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;4.8x&lt;/strong&gt; the known tokens of solo execution at six streams&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There was no token crossover either.&lt;/p&gt;

&lt;p&gt;That does not make the workers useless.&lt;/p&gt;

&lt;p&gt;Parallel workers can still provide useful properties such as isolated workspaces, bounded tasks, separate context, independent verification, and explicit ownership of different pieces of work.&lt;/p&gt;

&lt;p&gt;And when delegation is already required, the earlier benchmark showed that parallel workers can beat sequential delegation.&lt;/p&gt;

&lt;p&gt;But for raw speed on the workloads I measured, forcing delegation was clearly not winning.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where was the time going?
&lt;/h2&gt;

&lt;p&gt;One possibility was that the orchestration machinery itself was expensive.&lt;/p&gt;

&lt;p&gt;Maybe Git worktrees or integration were eating all the time.&lt;/p&gt;

&lt;p&gt;They were not.&lt;/p&gt;

&lt;p&gt;Measured median phases looked roughly like this:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Phase&lt;/th&gt;
&lt;th&gt;Median&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Supervisor work before batch&lt;/td&gt;
&lt;td&gt;37.1s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Worktree setup&lt;/td&gt;
&lt;td&gt;0.8s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Slowest worker&lt;/td&gt;
&lt;td&gt;187.1s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Integration&lt;/td&gt;
&lt;td&gt;0.4s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Supervisor review&lt;/td&gt;
&lt;td&gt;32.4s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The mechanical Git orchestration was tiny.&lt;/p&gt;

&lt;p&gt;Worktree setup plus integration was around &lt;strong&gt;1.2 seconds&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Most of the fixed overhead came from useful supervisor work: decomposing the task, writing bounded worker contracts, and reviewing the results afterward.&lt;/p&gt;

&lt;p&gt;But another effect became much more visible in the six-worker runs.&lt;/p&gt;

&lt;h2&gt;
  
  
  The slowest worker matters
&lt;/h2&gt;

&lt;p&gt;Parallel completion time depends heavily on the worker that finishes last.&lt;/p&gt;

&lt;p&gt;In one six-worker run, five workers finished within about 95 seconds.&lt;/p&gt;

&lt;p&gt;One worker took &lt;strong&gt;333 seconds&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The observed max-to-median worker-duration ratios in the two six-worker runs were around &lt;strong&gt;3.5x&lt;/strong&gt; and &lt;strong&gt;2.7x&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So in these runs, finishing five tasks quickly did not help enough because the batch still had to wait for the final worker.&lt;/p&gt;

&lt;p&gt;I also calculated a simple counterfactual using the measured timings.&lt;/p&gt;

&lt;p&gt;If every worker in the six-stream runs had completed around that run’s median worker duration, parallel execution would have landed around &lt;strong&gt;176 seconds&lt;/strong&gt;, compared with the 189.5-second solo median.&lt;/p&gt;

&lt;p&gt;That counterfactual would have crossed the solo median.&lt;/p&gt;

&lt;p&gt;But no observed run actually did.&lt;/p&gt;

&lt;p&gt;The 176-second number is arithmetic on measured timings, not a benchmark result.&lt;/p&gt;

&lt;p&gt;And with only two repetitions of the six-worker cell, I do not have enough data to characterize the full distribution of worker durations.&lt;/p&gt;

&lt;p&gt;So the careful conclusion is that the slow-worker tail looks like a strong candidate for an important parallel-latency constraint.&lt;/p&gt;

&lt;p&gt;It is not proven to be the only one.&lt;/p&gt;

&lt;h2&gt;
  
  
  The result changed how I think about orchestration
&lt;/h2&gt;

&lt;p&gt;When I started this project, I thought a successful orchestrator would mainly be good at distributing work.&lt;/p&gt;

&lt;p&gt;I now think that definition is incomplete.&lt;/p&gt;

&lt;p&gt;A good orchestrator should also be good at &lt;strong&gt;not distributing work&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Across the workloads I measured, Sol chose zero workers in every free-choice run. Forced delegation was slower on the corresponding fixtures.&lt;/p&gt;

&lt;p&gt;That does not prove that the free-choice policy itself caused the faster timings. These are stochastic model runs, and separate runs can behave differently.&lt;/p&gt;

&lt;p&gt;But none of the measured workloads provided evidence that declining delegation was the wrong decision.&lt;/p&gt;

&lt;p&gt;That leads to what is probably my favorite idea from the project so far:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The optimal number of workers can be zero.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;More agents are a tool, not an objective.&lt;/p&gt;

&lt;p&gt;Good orchestration is not about maximizing agent count.&lt;/p&gt;

&lt;p&gt;Sometimes the strongest agent should simply do the work itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  This does not mean one agent always wins
&lt;/h2&gt;

&lt;p&gt;I want to be careful about what these results actually show.&lt;/p&gt;

&lt;p&gt;They do &lt;strong&gt;not&lt;/strong&gt; prove that one strong agent is universally better than multiple agents.&lt;/p&gt;

&lt;p&gt;Every workload I tested still fit comfortably inside one Sol session.&lt;/p&gt;

&lt;p&gt;A much larger production repository may behave differently.&lt;/p&gt;

&lt;p&gt;A task running for hours may behave differently.&lt;/p&gt;

&lt;p&gt;Work that requires several highly specialized contexts may behave differently.&lt;/p&gt;

&lt;p&gt;And a workload large enough to push beyond what one supervisor can comfortably keep in context may be exactly where delegation starts to become much more valuable.&lt;/p&gt;

&lt;p&gt;That remains an open question.&lt;/p&gt;

&lt;p&gt;At what point does keeping everything inside one strong agent become more expensive than coordinating several workers?&lt;/p&gt;

&lt;p&gt;I do not have that answer yet.&lt;/p&gt;

&lt;p&gt;And I think that is more interesting than simply adding eight or ten agents to another synthetic fixture until I find a benchmark where parallelism wins.&lt;/p&gt;

&lt;h2&gt;
  
  
  The negative result is staying public
&lt;/h2&gt;

&lt;p&gt;One temptation with developer-tool benchmarks is to keep changing the experiment until your tool wins.&lt;/p&gt;

&lt;p&gt;I did not want to do that.&lt;/p&gt;

&lt;p&gt;My original prediction was that larger independent workloads would eventually produce a latency crossover.&lt;/p&gt;

&lt;p&gt;The benchmark falsified that prediction in the regime I tested.&lt;/p&gt;

&lt;p&gt;So the methodology, benchmark harness, raw records, and results are staying public.&lt;/p&gt;

&lt;p&gt;If someone wants to try the same setup on a genuinely large real-world workload, I would genuinely like to see what happens.&lt;/p&gt;

&lt;p&gt;That is one of the benefits of making the whole thing open source.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Sol-Luna Orchestrator&lt;/strong&gt; is open source:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/mahadansar/sol-luna-orchestrator" rel="noopener noreferrer"&gt;https://github.com/mahadansar/sol-luna-orchestrator&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Install it with:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -g sol-luna-orchestrator
sol-luna-orchestrator init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The repository includes the architecture, security model, benchmark fixtures, raw results, and documentation around the delegation policy.&lt;/p&gt;

&lt;p&gt;For now, I am deliberately holding off on major new features.&lt;/p&gt;

&lt;p&gt;I would rather see how people actually use it, what larger real-world workloads expose, and whether the assumptions behind the project continue to hold before deciding what is worth building next.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thought
&lt;/h2&gt;

&lt;p&gt;I started this experiment asking:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How many agents should work on a coding task?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I ended up with a question I like much more:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When should a strong agent delegate at all?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For the workloads I have measured so far, the answer was often:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It shouldn’t.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And I think knowing that is part of orchestration too.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
