<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/a-fleet-of-coding-agents-with-budget-caps-gnsqn4jgo" -->

---
title: A fleet of coding agents with budget caps | daily.dev
description: A tutorial shows how to build a fleet dispatcher that runs multiple coding agents (via Claude Code or other providers like opencode) in parallel, each as an...
canonical: https://daily.dev/posts/a-fleet-of-coding-agents-with-budget-caps-gnsqn4jgo
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: A fleet of coding agents with budget caps | daily.dev
og:description: A tutorial shows how to build a fleet dispatcher that runs multiple coding agents (via Claude Code or other providers like opencode) in parallel, each as an...
og:url: https://daily.dev/posts/a-fleet-of-coding-agents-with-budget-caps-gnsqn4jgo
og:image: https://api.daily.dev/og/posts/GNsQN4jGo.png
og:image:alt: A fleet of coding agents with budget caps
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# A fleet of coding agents with budget caps

**[AgentField.ai](https://daily.dev/sources/agentfield)** · 8 min read · 0 upvotes · 0 comments

## Summary

A tutorial shows how to build a fleet dispatcher that runs multiple coding agents (via Claude Code or other providers like opencode) in parallel, each as an independent app.harness() call with its own working directory, dollar cap, turn limit, and tool allowlist. The dispatcher uses asyncio.gather with a semaphore for concurrency, aggregates per-worker cost and pass/fail status into one report, and bounds worst-case total spend by the sum of per-worker caps. A worked example migrates eight code modules, routing 'hard' modules to Claude Code and 'easy' ones to a cheaper provider/model, landing at $4.15 total against a $10.50 worst case. Retry logic, Go/TypeScript differences (Go lacks a cost field), and the control plane's execution tracking are also covered.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://agentfield.ai/blog/coding-agent-fleet>

## Questions this post answers

### How do I run multiple Claude Code agents in parallel without one runaway blowing the budget?

Give each agent its own app.harness() call with a per-worker max_budget_usd cap, its own working directory (cwd), and a tool allowlist, then dispatch them concurrently with asyncio.gather (bounded by a semaphore) and return_exceptions=True so one crash or budget overrun does not cancel the others. The fleet's worst-case total cost is simply the sum of the per-worker caps, so eight workers at $1.50 each can never exceed $12.

_Teams wiring up multi-agent coding pipelines track patterns like capped fan-out on daily.dev._

### Can I mix different AI coding providers or models within the same agent fleet?

Yes, provider and model are per-call arguments in the harness API, so a single fleet can route harder tasks to claude-code while sending mechanical, well-defined tasks to a cheaper provider such as opencode with a smaller model like minimax/minimax-m2.5. The prompt, schema, working directory, and tool allowlist stay identical; only the routing dictionary changes per task tier.

_Developers deciding how to split work across coding-agent providers follow cost-routing tactics like this via daily.dev._

### Why doesn't the Go harness result include a cost field like the Python and TypeScript versions?

The Go harness.Result exposes NumTurns and duration but has no cost_usd equivalent, so fleet cost aggregation must be done in Python or TypeScript where result.cost_usd or result.costUsd is populated. Go fans out work using goroutines and an errgroup instead of asyncio.gather or Promise.all, but cost tracking is unavailable in that language's SDK surface.

_Engineers building cross-language agent tooling watch for SDK gaps like this on daily.dev._

## Similar posts on daily.dev

- [How to Run 10\+ Claude Code Sessions Without a Powerful Computer](https://daily.dev/posts/how-to-run-10-claude-code-sessions-without-a-powerful-computer-8cgisw1fv) · Towards Data Science · 0 upvotes · 0 comments
- [Claude Code On-The-Go](https://daily.dev/posts/claude-code-on-the-go-aslaulo4t) · Hacker News · 4 upvotes · 0 comments
- [The Developer's Guide to Autonomous Coding Agents: Orchestrating Claude Code, Ruflo, and Deer-Flow](https://daily.dev/posts/the-developer-s-guide-to-autonomous-coding-agents-orchestrating-claude-code-ruflo-and-deer-flow-uspeh7eds) · SitePoint · 1 upvotes · 0 comments

---

Tags: [#python](https://daily.dev/tags/python), [#claude-code](https://daily.dev/tags/claude-code)

[View this post on daily.dev](https://daily.dev/posts/a-fleet-of-coding-agents-with-budget-caps-gnsqn4jgo)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"A fleet of coding agents with budget caps","url":"https://daily.dev/posts/a-fleet-of-coding-agents-with-budget-caps-gnsqn4jgo","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/a-fleet-of-coding-agents-with-budget-caps-gnsqn4jgo"},"datePublished":"2026-10-02T17:45:21.508Z","dateModified":"2026-10-03T17:36:34.727Z","description":"A tutorial shows how to build a fleet dispatcher that runs multiple coding agents (via Claude Code or other providers like opencode) in parallel, each as an...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5bd5bd23271c03d2d3315b8f182b76d5?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5bd5bd23271c03d2d3315b8f182b76d5?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"AgentField.ai","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"AgentField.ai","logo":"https://media.daily.dev/image/upload/s--VLFHaedl--/f_auto/v1791063152/squads/33beeb91-1f14-4d9b-9cf8-db7d9f69160a?_a=BAMAMicg0","url":"https://daily.dev/squads/agentfield"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/a-fleet-of-coding-agents-with-budget-caps-gnsqn4jgo","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"python,claude-code","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"AgentField.ai","item":"https://daily.dev/squads/agentfield"},{"@type":"ListItem","position":3,"name":"A fleet of coding agents with budget caps"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/a-fleet-of-coding-agents-with-budget-caps-gnsqn4jgo#faq","mainEntity":[{"@type":"Question","name":"How do I run multiple Claude Code agents in parallel without one runaway blowing the budget?","acceptedAnswer":{"@type":"Answer","text":"Give each agent its own app.harness() call with a per-worker max_budget_usd cap, its own working directory (cwd), and a tool allowlist, then dispatch them concurrently with asyncio.gather (bounded by a semaphore) and return_exceptions=True so one crash or budget overrun does not cancel the others. The fleet's worst-case total cost is simply the sum of the per-worker caps, so eight workers at $1.50 each can never exceed $12. Teams wiring up multi-agent coding pipelines track patterns like capped fan-out on daily.dev."}},{"@type":"Question","name":"Can I mix different AI coding providers or models within the same agent fleet?","acceptedAnswer":{"@type":"Answer","text":"Yes, provider and model are per-call arguments in the harness API, so a single fleet can route harder tasks to claude-code while sending mechanical, well-defined tasks to a cheaper provider such as opencode with a smaller model like minimax/minimax-m2.5. The prompt, schema, working directory, and tool allowlist stay identical; only the routing dictionary changes per task tier. Developers deciding how to split work across coding-agent providers follow cost-routing tactics like this via daily.dev."}},{"@type":"Question","name":"Why doesn't the Go harness result include a cost field like the Python and TypeScript versions?","acceptedAnswer":{"@type":"Answer","text":"The Go harness.Result exposes NumTurns and duration but has no cost_usd equivalent, so fleet cost aggregation must be done in Python or TypeScript where result.cost_usd or result.costUsd is populated. Go fans out work using goroutines and an errgroup instead of asyncio.gather or Promise.all, but cost tracking is unavailable in that language's SDK surface. Engineers building cross-language agent tooling watch for SDK gaps like this on daily.dev."}}]}
```

