What to do when a sub-agent fails

The failure mode that kills multi-agent pipelines isn't a crash. It's a sub-agent that reports success when it didn't succeed. The agent hits an error, catches it, returns something that looks like...

By · · 1 min read

Source: dev.to

The failure mode that kills multi-agent pipelines isn't a crash. It's a sub-agent that reports success when it didn't succeed. The agent hits an error, catches it, returns something that looks like a result, and the lead agent moves on. The problem shows up two or three steps later — missing data, bad output, no trace back to where it broke. By that point you've burned context on work that needs to be redone. Why sub-agents swallow errors An agent told to "research X and return a summary" has implicit pressure to return something. Returning nothing feels like failure. So when a tool call errors out or the data is incomplete, the agent writes around it — "I wasn't able to find specific details, but generally speaking..." — and the lead agent reads that as a complete result. This is a system prompt problem. The default completion pressure is to produce output. You need an explicit instruction that returning an error is the correct behavior when the task can't be completed. What to put in