<?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: Taiki Mishima</title>
    <description>The latest articles on DEV Community by Taiki Mishima (@taiki200504).</description>
    <link>https://dev.to/taiki200504</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%2F4247564%2Ff7b5f3a5-564f-412d-bab2-7e7f369fa548.jpg</url>
      <title>DEV Community: Taiki Mishima</title>
      <link>https://dev.to/taiki200504</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/taiki200504"/>
    <language>en</language>
    <item>
      <title>What I Cut First When Reviewing a Multi-Subagent AI Architecture</title>
      <dc:creator>Taiki Mishima</dc:creator>
      <pubDate>Mon, 16 Nov 2026 11:06:52 +0000</pubDate>
      <link>https://dev.to/taiki200504/what-i-cut-first-when-reviewing-a-multi-subagent-ai-architecture-3o2c</link>
      <guid>https://dev.to/taiki200504/what-i-cut-first-when-reviewing-a-multi-subagent-ai-architecture-3o2c</guid>
      <description>&lt;p&gt;When debugging why a multi-agent system keeps breaking in practice, I rarely start by editing a prompt. First I cut the extra agent boundaries, the un-gated triggers, and the stale config paths that let failures accumulate silently.&lt;/p&gt;

&lt;p&gt;Most multi-subagent setups look clean on a whiteboard: a planner delegates to a researcher, a coder, a reviewer, and a deployer. In practice, every arrow between boxes is a place where state drops, context bloats, retries multiply, and evaluation drifts away from what actually runs. When looking at a failing agent architecture, I skip swapping orchestration frameworks or tuning phrasing and look for what can be deleted, turned into a plain deterministic tool, or folded back into one bounded loop.&lt;/p&gt;

&lt;p&gt;Here is what I inspect first, using three failures from an internal agent runner I build and operate (&lt;code&gt;mitama&lt;/code&gt;, which is my own in-development system rather than a client product) and the exact structural changes that stopped them.&lt;/p&gt;

&lt;h2&gt;
  
  
  What breaks first in multi-subagent systems?
&lt;/h2&gt;

&lt;p&gt;Before reading individual system prompts, I trace four things: where long-lived state lives, who is allowed to trigger external side effects, how context size is bounded, and whether the evaluation setup reads the exact same code and data as production.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Inspection Target&lt;/th&gt;
&lt;th&gt;Failure Signal&lt;/th&gt;
&lt;th&gt;What I Cut or Fold&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Long-lived coordinators&lt;/td&gt;
&lt;td&gt;Compaction loops, &lt;code&gt;"Prompt is too long"&lt;/code&gt;, child agents left idle for days&lt;/td&gt;
&lt;td&gt;Cut perpetual sessions; rotate at 60% context against one handoff file, or fold into one loop&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Parallel fan-out triggers&lt;/td&gt;
&lt;td&gt;Retries or non-draft pushes burning CI/API quotas overnight&lt;/td&gt;
&lt;td&gt;Cut autonomous trigger rights; gate side effects behind explicit state and &lt;code&gt;cancel-in-progress&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Always-loaded context &amp;amp; sync jobs&lt;/td&gt;
&lt;td&gt;Prompt bloat (&amp;gt;40k chars), blind full-corpus upserts, logging timeouts&lt;/td&gt;
&lt;td&gt;Cut stale instructions and unhashed full syncs; move telemetry off the critical path&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Automated evals&lt;/td&gt;
&lt;td&gt;High scores alongside broken real outputs, or scores stuck below threshold&lt;/td&gt;
&lt;td&gt;Cut proxy-only checks; calibrate against known-good and known-broken baselines&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Everything else in a review flows from those four checks. Below are the three core questions I use to diagnose a multi-agent setup, along with what actually failed in my own harness (&lt;code&gt;mitama&lt;/code&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  When should a multi-subagent system be folded back into a single loop?
&lt;/h2&gt;

&lt;p&gt;Fold subagents back into one loop whenever they share the same working context, pass free-form prose back and forth, or rely on a single long-lived coordinator to remember what happened across runs.&lt;/p&gt;

&lt;p&gt;Between November 8 and November 13, 2026, my main orchestrating agent (running Opus with four child subagents) stopped producing real work. Its last completed step was on November 8 at 14:06. By the time I caught the stall five days later, the coordinator had accumulated roughly 9,000 activity entries, gone through repeated context compactions, and died on &lt;code&gt;"Prompt is too long"&lt;/code&gt;. All four child agents stayed idle the entire time.&lt;/p&gt;

&lt;p&gt;Two design mistakes caused that five-day outage:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;One long-lived coordinator carried all orchestration history.&lt;/strong&gt; Because the lead agent stayed alive across days of subagent updates, tool outputs, and compactions, its context window became a single point of failure. Once compaction could no longer compress the thread, the agent became unresponsive instead of handing off cleanly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The health check tested liveness instead of progress.&lt;/strong&gt; A parent heartbeat checked whether the agent session existed, not whether its latest activity showed progress or an error loop. On top of that, a separate cleanup plugin ran every five minutes and archived child agents attached to a parent label if they sat idle for 20 minutes. When a parent session got archived, its child agents were swept away with it, killing background builds and tests in flight.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To fix it, I stopped treating the coordinator as an immortal process:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Rotate at 60% context usage.&lt;/strong&gt; Instead of waiting for compaction to fail, the coordinator tracks &lt;code&gt;LastUsage&lt;/code&gt; against the context ceiling and hands off to a fresh session at 60%, using a single handoff document as the source of truth rather than chat history.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check activity state in the heartbeat.&lt;/strong&gt; The 60-minute heartbeat inspects the latest activity log; if it sees &lt;code&gt;"Prompt is too long"&lt;/code&gt; or consecutive compactions, it forces an immediate rotation instead of reporting the session as alive.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explicitly decouple or fold short-lived subagents.&lt;/strong&gt; When a subtask does not require strict isolation of permissions, model tier, or failure blast radius, keeping it inside one bounded loop (&lt;code&gt;plan -&amp;gt; act -&amp;gt; observe -&amp;gt; decide&lt;/code&gt;) eliminates the handoff and parent-child lifecycle bugs altogether.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A second agent is only justified when you have a concrete isolation requirement: for example, you want a read-only reviewer that cannot touch write tools, you need a cheaper model for a high-volume map step, or a subtask runs in a separate worktree. If two agents share the same permissions, the same files, and the same model, splitting them just gives you two context windows to desynchronize.&lt;/p&gt;

&lt;h3&gt;
  
  
  How I decide what stays a tool vs. becomes a subagent
&lt;/h3&gt;

&lt;p&gt;When mapping an existing architecture, I apply three tests to every agent box on the diagram:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Does it have a deterministic contract?&lt;/strong&gt; File diffing, schema validation, database upserts, and test execution do not need an LLM reasoning loop around them. Make them deterministic tools called by the main loop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Does it need independent memory?&lt;/strong&gt; If the step needs 20 lines of input and returns a structured JSON verdict, a stateless function call or single-turn tool invocation works better than a persistent subagent thread that accumulates stale history.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Can a failure in this box silently hang the parent?&lt;/strong&gt; Every asynchronous child introduces timeout, orphan, and state-reconciliation code. Unless parallelism cuts wall-clock time meaningfully or isolation is mandatory, sequential execution inside one loop is cheaper to maintain.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How do you stop parallel subagents from blowing through CI or API budgets?
&lt;/h2&gt;

&lt;p&gt;You stop budget blowups by removing autonomous trigger privileges from subagents and putting hard state gates in code or workflow definitions, never by adding "please be mindful of cost" to a system prompt.&lt;/p&gt;

&lt;p&gt;On November 7, 2026 at 14:22 JST, GitHub Actions blocked all jobs on my repository with &lt;code&gt;"Usage blocked"&lt;/code&gt; after hitting the $10 monthly budget cap. That month had already reached 557 CI runs, with 140 &lt;code&gt;pull_request&lt;/code&gt; triggers firing on November 7 alone.&lt;/p&gt;

&lt;p&gt;Tracing the logs showed why. Several parallel coding subagents wanted CI feedback before reporting back, so they opened pull requests without the &lt;code&gt;draft&lt;/code&gt; flag and pushed repeated incremental fixes to the same branches. Every push spun up more than 20 jobs, including full database service containers. At the same time, a scheduled wake job was running on macOS runners (which carry a 10x billing multiplier), accounting for 57 of the previous 200 workflow runs.&lt;/p&gt;

&lt;p&gt;The subagents were following their instructions: write code, verify it, and fix failures. The architecture lacked a gate between "subagent pushed a commit" and "spin up 20 containers on paid runners."&lt;/p&gt;

&lt;p&gt;Here is what I changed in the repository and agent guardrails to stop the bleed:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Gate heavy workflows behind explicit review states.&lt;/strong&gt; Heavy CI jobs now run only on &lt;code&gt;ready_for_review&lt;/code&gt;, an explicit &lt;code&gt;run-ci&lt;/code&gt; label, or manual dispatch. Routine subagent branches stay in &lt;code&gt;draft&lt;/code&gt; mode.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cancel redundant runs automatically.&lt;/strong&gt; Adding &lt;code&gt;concurrency&lt;/code&gt; with &lt;code&gt;cancel-in-progress: true&lt;/code&gt; stops older pushes on the same branch from finishing after a newer commit arrives.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Skip CI on documentation-only edits and restrict expensive runners.&lt;/strong&gt; Docs changes no longer trigger test matrices, and the wake workflow was restricted to &lt;code&gt;main&lt;/code&gt; instead of firing across branches on 10x runners.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Block full-suite runs inside subagent shells.&lt;/strong&gt; Subagents run targeted unit tests for the files they touched; full test suites wait for the merge gate.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The general rule for any multi-agent architecture is simple: &lt;strong&gt;an LLM loop should never hold an unthrottled trigger for an external meter.&lt;/strong&gt; Whether the meter is GitHub Actions minutes, LLM token spend, email sends, or database writes, the cap belongs in the deterministic wrapper around the tool. Rate limits, &lt;code&gt;max_retries&lt;/code&gt;, idempotency keys, and &lt;code&gt;dry_run&lt;/code&gt; defaults are architecture concerns. Prompts cannot enforce budgets reliably when an agent hits an unexpected error loop.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why do automated agent evals pass while the real workflow breaks?
&lt;/h2&gt;

&lt;p&gt;Automated evals pass on broken systems for two reasons: the production runner is using different code or configuration than the eval expects, or the eval grades proxy metrics that miss the actual failure mode.&lt;/p&gt;

&lt;p&gt;Both happened in my own setup within the same two-week period.&lt;/p&gt;

&lt;h3&gt;
  
  
  Failure mode A: Silent drift between production and the repo
&lt;/h3&gt;

&lt;p&gt;On November 2, 2026, while auditing why my self-improvement loop (RSI) was repeatedly ending in no-ops, I found five separate layers of drift running simultaneously:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Production was 198 commits behind &lt;code&gt;main&lt;/code&gt;.&lt;/strong&gt; The symlink serving the live runner pointed to a side branch (&lt;code&gt;rsi/local-edits-1028&lt;/code&gt;) left over from an earlier debugging session. I kept reading and improving &lt;code&gt;main&lt;/code&gt;, while production executed older logic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;54 predictions had never been graded.&lt;/strong&gt; The scoring pipeline ran, but missing deadline handling left historical predictions ungraded, hiding real accuracy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A sync script re-sent 1,289 files every 10 minutes.&lt;/strong&gt; Without content hashing, an audio-capture uploader attempted to upsert all 1,289 files on every 10-minute tick. Each failed file appended an error line, generating 69,000 error lines and pinning the friction log at its 2,500-line ceiling so new issues could not even be recorded.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Telemetry blocked the critical path past the 30-second timeout.&lt;/strong&gt; An MCP server awaited a database insert inside a &lt;code&gt;finally&lt;/code&gt; block before returning responses, pushing tool latency to 30 to 37 seconds and tripping Claude's 30-second connection timeout.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Always-loaded context had bloated to 73,781 characters.&lt;/strong&gt; Rules, skill descriptions, and memory indexes loaded on every turn had crept past 73k characters before I trimmed them to ~39,988 characters (and two weeks later, by November 16, it had already crept back up to 44,262 characters against a 40,000-character limit).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I fixed those with mechanical invariants: pinning the live runner to &lt;code&gt;origin/main&lt;/code&gt; with &lt;code&gt;git pull --ff-only&lt;/code&gt; and &lt;code&gt;exec&lt;/code&gt; on entry so stale branches cannot linger; comparing &lt;code&gt;sha256&lt;/code&gt; digests so only changed files upload; moving logging into &lt;code&gt;EdgeRuntime.waitUntil&lt;/code&gt; off the response path; and putting a hard 4-day cutoff on prediction grading.&lt;/p&gt;

&lt;h3&gt;
  
  
  Failure mode B: An eval that gave 96/100 to an unreadable screen
&lt;/h3&gt;

&lt;p&gt;Even when production and the test runner match, proxy graders lie.&lt;/p&gt;

&lt;p&gt;On October 28, 2026, an automated UX evaluator (&lt;code&gt;jev&lt;/code&gt;) gave a newly built status page &lt;strong&gt;96/100 on desktop and 95/100 on mobile&lt;/strong&gt;. When I opened the actual rendered screenshot at 1440x900, the page was unusable: internal jargon everywhere, tiny low-contrast text, and 50 lines of raw HTTP logs pushed to the right with no plain summary at the top.&lt;/p&gt;

&lt;p&gt;Why did it get 96/100? Because the grading script passed numeric DOM JSON (overflow checks, pixel sizes, contrast ratios, console error counts) to a text-only evaluator that never looked at an image. To the JSON schema, "nothing overflowed and font sizes met minimums" looked like perfection.&lt;/p&gt;

&lt;p&gt;A day earlier, on October 27, I hit the opposite calibration bug on a browser UI review: 14 behavioral checks were green, yet vague grading prompts like "is this UI good?" capped even a known-good ideal state at &lt;strong&gt;61 to 73 points&lt;/strong&gt; (while a deliberately broken state scored 12 to 22). Until I calibrated every question against an explicit good baseline (A) and broken baseline (B) and replaced vague questions with concrete observable conditions, a 90-point pass threshold was unreachable.&lt;/p&gt;

&lt;p&gt;Both problems pointed to the same fix:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Never trust an uncalibrated eval.&lt;/strong&gt; Before using any LLM-as-a-judge score as a gate, run it on one known-good example and one known-bad example. If the good example cannot clear 90, fix the rubric before tuning the agent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inspect the actual artifact alongside telemetry.&lt;/strong&gt; If your agent produces UI, check the rendered first viewport (&lt;code&gt;1440x900&lt;/code&gt; and &lt;code&gt;390x844&lt;/code&gt;). If it writes SQL or emails, sample the raw artifacts alongside pass/fail booleans.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I inspect in a 14-day architecture review
&lt;/h2&gt;

&lt;p&gt;In the 14-day architecture review I offer, the work follows the same sequence I used to clean up my own setup:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Map every agent, state store, and external trigger.&lt;/strong&gt; I trace where context enters, where it gets compacted or dropped, and what happens when a step times out or retries twice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Identify every subagent that can become a tool or a loop step.&lt;/strong&gt; Most multi-agent codebases improve as soon as 40 to 60 percent of the orchestration glue is removed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Locate missing cost and safety gates.&lt;/strong&gt; I mark every API call, CI trigger, database write, or outbound message that currently relies on prompt wording instead of code-level bounds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check live-vs-eval alignment.&lt;/strong&gt; I verify whether your eval suite tests the actual production config and whether your grading rubric is calibrated against real failures.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write the target single-loop spec and cut list.&lt;/strong&gt; You get a written architecture map, diagnosis, target single-loop design with explicit tool contracts, and prioritized next steps ordered by risk and engineering effort.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Who this review is not for
&lt;/h2&gt;

&lt;p&gt;To avoid wasting your time or mine, I turn down work that falls outside a bounded written review:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ongoing implementation or full rebuilds.&lt;/strong&gt; I do not take recurring engineering retainers or production build contracts. Your team keeps full ownership of writing and shipping the code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Greenfield ideation.&lt;/strong&gt; If you do not yet have an agent codebase, prompt/config set, failure logs, or concrete system design on paper, there is nothing to audit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audits requiring live production credentials.&lt;/strong&gt; I review exported repositories, redacted logs, and architecture notes asynchronously. I do not log into live customer databases or production API accounts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Framework shopping.&lt;/strong&gt; If you mainly want someone to compare LangGraph, CrewAI, AutoGen, and custom SDKs in the abstract, you do not need a $1,400 review. The failure modes above happen in all of them.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Background and availability
&lt;/h2&gt;

&lt;p&gt;I am Taiki Mishima, based in Japan, an undergraduate at Rikkyo University currently on leave (expected graduation March 2029). I maintain my own multi-agent runner (&lt;code&gt;mitama&lt;/code&gt;) and allocate around 5 hours per week to written architecture reviews, communicating asynchronously in English. Terms are fixed at $1,400 USD for a 14-day turnaround with one revision round.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.upwork.com/services/product/development-it-an-ai-agent-architecture-review-fold-multi-subagent-sprawl-into-one-loop-2118526378880612216" rel="noopener noreferrer"&gt;https://www.upwork.com/services/product/development-it-an-ai-agent-architecture-review-fold-multi-subagent-sprawl-into-one-loop-2118526378880612216&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>architecture</category>
      <category>llm</category>
    </item>
  </channel>
</rss>
