Sound familiar? You give an advanced terminal agent a task to rewrite a legacy authentication module or implement a complex caching algorithm. The model briskly starts shuffling files, makes a dozen commits, and forty minutes later cheerfully reports success. You run the tests—and the project won't even build because the agent picked an outdated version of a third-party library and hit an architectural dead end.
In programming, there is no single right path. Human developers frequently debate approaches, sketch drafts in separate Git branches, and pick the cleanest, fastest solution.
That exact spirit of competition underpins the open-source desktop application Herdr. The program lets you launch a parallel "Code Race" in a couple of clicks: you define one task, and Herdr sets several independent agents (Claude Code, Mistral, DeepSeek) loose on it, isolating each in its own Git branch. Earlier, we explored the Orkas environment for parallel AI agent teams, and Herdr pushes that philosophy toward a direct head-to-head contest of approaches.
How the Code Race Mechanism Works in Herdr
Herdr doesn't try to invent its own code-generation engine—it acts as a conductor for existing CLI tools. The desktop app is built on Electron and Rust, keeping system resource usage minimal.
The workflow looks like this:
- Sandbox initialization: When a task starts, Herdr creates temporary isolated Git branches (
race/claude,race/mistral,race/deepseek). - Parallel launch: Terminal processes for the respective agents spin up in the background, each receiving the same context and system prompt.
- Real-time progress monitoring: In a single GUI window, you watch four terminals side by side: which files each model is editing, how many tokens have been spent, and which bash commands are running right now.
- Automated arbitration: The moment one of the agents declares completion, Herdr runs the test suite (
npm testorpytest) and displays a comparative results table. - Interactive merge: The developer can inspect the diff between branches in a visual comparison view and merge the winning variant into the main branch with one click.
- Temporary branch cleanup: Once a winner is chosen, Herdr automatically deletes the losing bots' drafts without polluting the repository's commit history.
Installation and Team Configuration Manifest
Installing the utility on Linux, macOS, and Windows takes a single line in the terminal:
# Install for macOS / Linux via curl
curl -fsSL https://get.herdr.ai/install.sh | bash
# Launch the Herdr desktop interface
herdr start --workspace ./projects/saas-landing
The roster of competing bots and race-stopping rules are defined in the herdr_team.json manifest:
{
"$schema": "https://herdr.ai/schemas/v1/team.json",
"teamName": "landing-page-race-team",
"workingDirectory": "./projects/saas-landing",
"concurrencyLimit": 4,
"raceMode": {
"enabled": true,
"evaluationMetric": "visual_and_build_success",
"timeoutMinutes": 15
},
"participants": [
{
"agentId": "claude-code-runner",
"model": "claude-3-7-sonnet",
"branchPrefix": "race/claude",
"command": "claude --dangerously-skip-permissions"
},
{
"agentId": "mistral-large-runner",
"model": "mistral-large-latest",
"branchPrefix": "race/mistral",
"command": "herdr-agent --provider mistral"
},
{
"agentId": "deepseek-coder-runner",
"model": "deepseek-coder-v2",
"branchPrefix": "race/deepseek",
"command": "herdr-agent --provider deepseek"
}
]
}
Practical Value and the Economics of Competition
Of course, running three or four models on a single task triples total token consumption. In critical scenarios, however, that extra spend pays for itself immediately:
- Saving engineering time: Instead of waiting for one model to finish, hitting a dead end, and starting over, you get three fundamentally different architectural solutions in 10 minutes.
- Informed winner selection: One bot may write more concise code but forget tests; a second implements rock-solid checks but bloats the dependency tree. A human picks the best branch and merges it into
mainin one click. - Divergence analysis: Comparing how different models tackle the same algorithmic problem often reveals subtle edge cases you hadn't thought of yourself.
- Automatic environment conflict resolution: Each agent runs in an isolated subprocess with its own set of environment variables, preventing mutual overwrites of temporary files and port collisions on the local dev server.
- Support for local and cloud models: You can pit cloud giant Claude 3.7 Sonnet against a local DeepSeek Coder model running via Ollama on your laptop in the same race, visually comparing price, speed, and quality on real project files.
Herdr turns AI-assisted development from a game of roulette into a controlled engineering competition of solutions.

