Full Control – Gas Town Orchestrates Ten or More Coding Agents | heise online

Full Control – Gas Town Orchestrates Ten or More Coding Agents

Many simultaneously acting agents often cause more chaos than benefit. The Gas Town tool orchestrates in the style of Mad Max.

listen Print view
Industrial facility with a pipe labeled "Methane"

(Image: Orange Dragon Studio/Shutterstock.com)

13 min. read
By
  • Ingo Eichhorst
Contents

Mad Max as a role model for software development? The new Gas Town framework from developer and blogger Steve Yegge orchestrates more than ten coding agents simultaneously with an architecture inspired by the post-apocalyptic film series. The approach: not perfect individual agents, but controlled chaos with agent roles such as mayor, guardian, and refinery, all based on the Mad Max films (see table at the end of the article). Gas Town is not for the faint of heart or the light of wallet.

Ingo Eichhorst
Ingo Eichhorst

Ingo Eichhorst is an AI architect and engineering trainer at IONOS. He has been working in various IT roles such as CTO, solution architect, and software engineer for over 15 years. He is currently focusing intensively on AI-supported software development, AI architecture, and the challenges of using AI agents in practice.

Yegge emphasizes that the system is still in alpha stage and requires considerable prior knowledge of coding agents to handle the chaos in the city of coding agents. Furthermore, due to the strong scaling, you quickly need a second or third Claude Max subscription from Anthropic, which costs $100 or $200 per month depending on the variant.

Gas Town is part of a whole group of applications currently being hotly debated by the community, whose goal is to coordinate coding agents. These orchestrators include, for example, Ralph, Loom, or AutoClaude. Yegge released the framework on January 1, 2026, after only seventeen days of development. However, the concept incorporates over a year of experimental experience. He wrote it using AI agents in Go.

Yegge starts from the idea that it has always been the task of engineers to transform complex chaos into manageable structures. The tool tackles one failure mode after another with different concepts. The author speaks of non-deterministic idempotence, two terms that seem contradictory at first glance but come together through the framework's control structures. The parallel work of three to five coding and other AI agents can lead to chaotic system states. What happens, for example, when multiple agents work on the same or similar tasks? Who takes care of merge conflicts? How can duplicate work be prevented? Gas Town uses a wide variety of concepts to bring order to the chaos (see the following figure).

The Gas Town architecture with Control Plane (Mayor, Deacon) and Data Plane (Polecats, Rigs, Refinery, Witness). The task management agent Beads manages all tasks, Convoys bundle tasks for the worker agents.

A typical day in Gas Town begins with the human developer (Overseer) and the main agent, the Mayor, defining the tasks for the day in natural language. The Mayor breaks down these tasks into smaller subtasks and stores them in the task manager (Beads). Once the preparations are complete, he bundles tasks into a work order, the Convoy, and sends them to one of the repositories, Rigs. If Gas Town has access to valid GitHub authentication, the Mayor can easily clone repositories and initialize them for use with Gas Town.

The division of tasks addresses the problem of declining quality of coding agent responses as their context window fills up. For Claude LLMs, this is currently 200,000 tokens. When the limit is reached, the coding agent compresses the dialogues to make space. In practice, even a context window filled to sixty percent leads to a noticeable reduction in output quality.

In the Rig, worker agents (Polecats) become active and start processing tasks. The more tasks there are, the more Polecats spring into action. They create their own work environment with Git worktrees and independently handle the implementation.

They can communicate with each other via Mailboxes and Handoffs. The Mailbox system is inspired by Erlang and is used for communication between long-lived agents, such as the Mayor and the Deacon. Handoffs, on the other hand, work synchronously and are used to transfer the work state to a new worker instance when the context exceeds the critical fill level described above.

Since things occasionally go wrong in Gas Town, the Mayor employs the Deacon, who periodically analyzes the overall system, cleans up zombie processes, restarts stuck sessions, and keeps the most important system functions alive. Unlike the Deacon, who patrols at the system level, the Witness monitors individual agents within a Rig. Any agent he catches slacking, he coldly murders and replaces.

Videos by heise

With multiple agents, there are many parallel changes, duplicate work, and countless merge conflicts. Furthermore, more and more developers report that the joy in their job has decreased since they only review code from AI agents.

To overcome these problems, Gas Town has a Refinery. It checks all agent work results and cleans up. It combats merge conflicts and poor code quality primarily through quality criteria that can be set up via configurable review presets and a project-specific CLAUDE.md.

After all tasks are completed, the Mayor proudly reports the successful completion of the Convoy task group to the developer.

Agents in Gas Town are interchangeable instances, comparable to the concept of Cattle instead of Pets in infrastructure orchestration with virtual machines or containers, for example with Kubernetes. Beyond that, the framework has much in common with Kubernetes: there is a Control Plane (Mayor and Deacon) that manages a Data Plane (Polecats and Witnesses). The worker agents (Polecats) are interchangeable: if they stop working or get stuck, they are replaced by a new instance without losing the context from the last session.

When developers blindly produce code with agents, technical debt accumulates over time. This also appears as misconceptions (Heresies) in the agents' inner monologue, and human developers can track and understand them. The cause of the errors is often the limited context window, due to which agents lose sight of what happened in the last session. Previously chosen approaches are forgotten, and agents sometimes choose foreign design methods that violate architectural consistency. In a larger codebase, for example, three to four different logging libraries can appear.

To counter this, careful human reviews are required, which in turn eats into the productivity gains from multiple agents. Gas Town chooses a different strategy based on sampling, Sweeps: systematic correction waves that curb architectural drift and bad practices without developers having to consider all misconceptions or analyze all lines of code individually. A sixty-minute review sweep results in concrete tasks for task management (Beads), which thus enter the context of the involved agents. This steers future decisions in the direction that human developers consider correct.

To start a Sweep, developers have the Mayor create a Git worktree via a persistent workspace (~/gas-town/<rig>/crew/<developer-name>/rig/) and view the work results of a Convoy there as usual in the IDE or terminal. Instead of making changes themselves, they instruct the Mayor to create correction tasks. These change the behavior of the agents and lead to a further increase in code quality. Gradually, trust in the agent swarm increases, and the effort for Sweeps decreases. Sweeps represent a kind of garbage collection for technical debt. In addition, developers should not forgo common control methods such as rule files (AGENT.md or CLAUDE.md) and static quality gates such as fitness functions or static code analysis.

Gas Town does not solve the immediate problems of LLMs such as hallucinations or lack of semantic correctness. Rather, it attempts to create an abstraction layer that leads to predictable and high-quality results despite these problems.

In addition to LLM tokens, Gas Town requires good specifications as input, such as those provided by the BMAD method or the Spec Kit. The Mayor then converts these into agent-digestible tasks and stores them in the Beads task manager.

Despite the many predefined structures and limitations, the framework is open to all workflows. Whether Test-driven Development, Agile, or other frameworks for agent workflows (like Loom or Ralph), it supports many approaches. As a pragmatic start for a workflow, Yegge recommends his self-developed MEOW stack (Molecular Expression of Work), which divides and sorts tasks in a specific way. TOML-based workflow templates called Formulas, for example, describe how code reviews, deployments, or security audits should proceed. Users can specify them at both the repository level (Rig) and for the entire city.

Gas Town is resource-intensive, just like the city of the same name in Mad Max, with at least $200 per month to budget for. Furthermore, one should familiarize oneself with tmux, which serves as the UI and message bus in Gas Town. The installation of Beads and Gas Town itself is then straightforward and follows the instructions in the respective repositories. Installation can be done via Homebrew, npm, or directly from the Go source code.

System Requirements:

  • Go 1.23 or newer
  • Git 2.25+ (Worktree support required)
  • sqlite3
  • tmux 3.0+ (recommended for multi-agent monitoring)
  • Claude Code CLI or Codex CLI
  • Max subscription for Anthropic Claude Max – For an initial test, a subscription for $20 or $100 is sufficient, but it will quickly push Gas Town to its limits.
# Listing 1: Gas-Town-Installation

# Homebrew (empfohlen für macOS)
brew tap steveyegge/gastown && brew install gt

# npm
npm install -g @gastown/gt

# Go (aus Quellcode)
go install github.com/steveyegge/gastown/cmd/gt@latest

Listing 1: Gas-Town Installation

# Listing 2: Beads-Task-Manager-Installation

# Homebrew
brew install steveyegge/beads/bd

# npm
npm install -g @beads/bd

# Shell-Script (Linux/macOS)
curl -fsSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash

Listing 2: Beads Task Manager Installation

# Listing 3: Workspace initialisieren

# Workspace erstellen mit Git-Integration
gt install ~/gt --git
cd ~/gt

# Alle Gas-Town-Control-Plane-Komponenten starten 
gt start

# (Optional) Projekt (Rig) hinzufügen
gt rig add meinprojekt https://github.com/user/repo.git

# (Optional) Crew-Workspace erstellen
gt crew add entwickler1 --rig meinprojekt

# (Optional) Beads im Projekt initialisieren
cd meinprojekt
bd init --prefix mp

# Mayor starten
gt mayor attach

Listing 3: Initialize Workspace

Alternatively, the Mayor can also handle the setup of Rig, Crew, and Project via prompt:

# Listing 4: (Alternatives) Setup durch den Bürgermeister

gt mayor attach

# Im Mayor-Terminal: Setup delegieren
> Richte ein neues Rig für mein Projekt unter https://github.com/user/repo.git ein. Erstelle einen Crew-Workspace und 3 Polecat-Agenten Mitglieder und initialisiere Beads mit dem Prefix "mp".
# Mayor führt die Commands automatisch aus:
# gt rig add repo https://github.com/user/repo.git
# gt crew add entwickler1 --rig repo
# cd repo && bd init --prefix mp

# Abarbeitung eines Tickets starten
> Erstelle Beads-Aufgaben aus GitHub-Issue 123 und starte die Abarbeitung

Listing 4: (Alternative) Setup by the Mayor

After successful installation, the Mayor takes over orchestration with gt mayor attach. From here on, developers communicate mostly with him, who automatically breaks down tasks, creates Convoys, and assigns them to agents. Developers can also directly control the worker agents (Polecats) in the city via tmux sessions ctrl+b s to monitor them or intervene in case of errors.

A Convoy could, for example, proceed as follows:

  1. The Mayor is informed by the human developer (Overseer) and can ask clarifying questions.
  2. He analyzes and breaks down the task.
  3. Then he creates a Convoy of tasks and creates agents to whom he assigns tasks and which are processed by them.
  4. The activity can be observed via the Convoy status in tmux or via the Beads Viewer (bv).
  5. The Mayor provides a final summary.

Human developers (called "Crew" in Gas Town) can decide whether they want to check the work results in their own git-worktree and have them adjusted if necessary, or whether they should be pushed as a Pull Request.

Gas Town in action in the tmux interface. Left: Claude Code instance of the Mayor, coordinating tasks. Top right: Convoy status shows the progress of the current task. Bottom right: Beads Viewer (bv) lists all tasks in the system.

A workflow with the Mayor could look like this:

# Mayor-Session starten
gt mayor attach

# Im Mayor-Terminal: Aufgabe direkt formulieren
> Implementiere User-Authentication mit OAuth2

# Mayor analysiert, zerlegt Aufgabe, erstellt Convoy, verteilt an Agenten

# Convoy-Status überwachen (in separatem Terminal)
gt convoy list
gt convoy show cv-abc12

Listing 5: Workflow with the Mayor

Due to its complexity, the architecture with Mayor, Deacon, and Refinery has a steep learning curve. However, since the framework is still in the alpha phase, even with a good understanding of the design, chaos often arises in the post-apocalyptic city.

In the practical test of version 0.2.6, the framework ran stably, but agents often got stuck or could not complete their tasks, so the Mayor had to call them back to work. Although the Deacon accidentally cleared some agents, Gas Town was able to continue working afterward. However, several million tokens were lost. After a few days of experience, one gets used to the central communication with the Mayor, which forms a bracket across all repositories.

Gas Town is not for beginners. Anyone who has never worked with multiple coding agents simultaneously will quickly drown in this post-apocalyptic city. The framework is aimed at experienced developers who have already experienced the limitations of individual agents and are willing to invest a lot of money in orchestrated chaos.

For the future, there is hope that the effectiveness of the models will continue to improve, so that soon Mistral as a European provider or the manufacturers of open-source models will be able to work with orchestrators like Gas Town. Currently, the framework is limited to operation with Claude Code and Codex CLI.

For those who are not yet deterred by the Mad Max chaos and want to delve deeper into the world of agent orchestration, Steve Yegge offers further information:

Gas Town Role German Name Function Film Reference
Mayor Bürgermeister Global coordinator, AI chief agent, and main interface to humans In "Mad Max: Fury Road," the Mayor (People Eater) rules Gas Town
Deacon Wächter System watchdog (portmanteau of Daemon-Beacon) Inspired by Lord Humungus (Mad Max 2: The Road Warrior)
Witness Aufseher* (original Zeuge) Monitors Polecats and Refinery per Rig, detects stuck agents Exclamation of the Polecats: "Witness me!" (Mad Max: Fury Road)
Polecat Arbeiter-Agent** Short-lived worker agents that process tasks in Git worktrees Polecats: Warriors on swing poles (Mad Max: Fury Road)
Refinery Raffinerie A merge queue manager that resolves merge conflicts and ensures code quality Gas Town is the oil refinery in "Mad Max: Fury Road"
Crew Crew Long-lived, named agents for persistent collaboration Generic Mad Max term
Overseer Menschlicher Entwickler The human operator and supervisor No direct film reference
Rig Rig Project repository under Gas Town management War rigs in all Mad Max films
Convoy Convoy Bundled work orders from multiple Beads War convoys in all Mad Max films
Beads Beads Git-based atomic work units, task management No Mad Max reference (separate system)

Notes on translations:

* Witness vs. Zeuge: In the German dub of "Mad Max: Fury Road," it says: "Witness me!" ("Sei mein Zeuge!"). In the article, "Aufseher" is used as a functional translation to make the role easier to understand.

** Polecat vs. Arbeiter-Agent: The Pole Cats are warriors in Mad Max Fury Road who board enemy vehicles on long swing poles. In the article, "Arbeiter-Agent" is used as a functional translation.

(who)

Don't miss any news – follow us on Facebook, LinkedIn or Mastodon.

This article was originally published in German. It was translated with technical assistance and editorially reviewed before publication.