Menu

1 / 2

My AI Agents Kept Burning Tokens on Subagents That Can't Code — So I Built a Decision Gate

DEV Community·Vilius·6 months ago
#0r9tT6oj
#python#ai#opensource#delegation#agent
Reading 0:00
15s threshold

By Vilius Vystartas | May 2026

I run 19 autonomous AI agents in production. They handle research, content, monitoring, deployment — the kind of always-on work that makes a solo developer's output look like a small team's.

The delegation feature was supposed to be the multiplier. Spawn a subagent, give it a task, get results in parallel. In theory, it turns one agent into many. In practice, it was burning thousands of tokens for exactly zero output.

The problem wasn't the agents. It was that nobody had taught them when not to delegate .

The Problem That Forced My Hand

Here's what happens when you ask a subagent to code something:

The subagent spawns, reads the context, starts working — looks promising

It tries to write a file. The file operation fails silently. The subagent doesn't notice

It tries again with a different approach. Same silent failure

Six hundred seconds later: timeout. Zero output.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.