Every developer who has used Claude Code, Cursor, or Copilot has seen the same thing. The tools work well for small tasks. Ask them to fix one bug, write one function, or change one file they do it well.
But real engineering work is bigger. It might involve fixing dozens of security issues, migrating hundreds of files, or changing multiple services at once. In those situations, a single AI agent struggles. It loses track of progress, runs out of context, and cannot safely handle many tasks at the same time.
The problem is not the model’s intelligence. The problem is the architecture. One agent with one context window behaves like a single developer. But large software projects need something closer to a factory with many workers.
This is the idea behind Gas Town, created by Steve Yegge, a former engineer at Amazon and Google and a well-known voice in the “vibe coding” movement.
Let’s Understand The Gas Town
Gas Town is a Go (programing language)-based tool and CLI that manages many Claude Code agents working at the same time. The system works like a factory. A Mayor agent (main coordinating AI agent) plans and breaks work into tasks.
Polecat worker agents (temporary AI coding agents in Gas Town that pick up a specific task, complete the code changes, submit a merge request, and then shut down)do the tasks separately in isolated Git worktrees.
A Witness agent (monitoring agent that watches worker agents, detects when they get stuck, and helps restart or recover their tasks) reviews every code change, and the Refinery merges the final code and triggers CI.
Each role acts like a real engineering job architect, developer, reviewer, and DevOps but all of them run in parallel at machine speed.
The key idea behind Gas Town is that most engineering tasks can run in parallel. For example, fixing a SQL injection bug in the login route has no connection to adding TypeScript types in a logger. Both tasks can run at the same time without conflicts.
Normally developers do them one by one because humans can only focus on one task at a time. Gas Town removes this limit and lets many agents work simultaneously.
Technologies Used Behind The Scene
Gas Town is written in Go (1.21+) for its daemon and orchestration system. Go was chosen because its goroutines (lightweight thread in Go that lets a program run multiple tasks at the same time.) handle many tasks at the same time efficiently, like running dozens of AI agents in parallel and monitoring their progress. The CLI tool gt talks to the daemon through a local Unix socket.
The agent execution layer relies on Claude Code CLI (@anthropic-ai/claude-code), which must be installed separately. Gas Town launches Claude Code as a subprocess, sends it a prompt and working directory, then reads its output to detect when a task is finished. This lets Gas Town use all Claude Code abilities like editing files, running commands, executing tests, and performing Git operations.
Work isolation is handled using Git Worktrees (Git 2.30+). Each agent gets its own copy of the repository, so multiple agents can work on different tasks without interfering with each other.
Gas Town tracks task progress using Beads, a system that stores structured JSON records in a Git branch (gt-ledger). Because the data is stored in Git, task history persists even if the daemon restarts and can be audited later using git log.
Key Features Of Gas Town
Gas Town isn’t just another AI wrapper. It introduces a new, agent-factory architecture for high-velocity software development, where specialized AI agents coordinate, persist context, operate safely in isolated environments, and scale through orchestration enabling faster, more reliable, and more collaborative coding workflows.
Agent Factory Architecture: Gas Town replaces single-assistant workflows with coordinated swarms of specialized agents. A central “Mayor” agent plans and distributes work, while parallel worker agents execute tasks independently, enabling scalable and collaborative software development.
Persistent Execution & Context: Unlike traditional AI sessions that lose state, Gas Town uses a Beads-based ledger to persist decisions, task history, and handoffs. Agents can restart, recover from failures, and continue work without losing context.
Safe, Git-Backed Isolation: Each agent operates in its own Git worktree, ensuring changes are fully isolated. This makes experimentation safe, allows instant rollbacks, and prevents one agent’s failure from impacting others.
Ecosystem-Driven Scaling: Gas Town integrates with advanced tooling such as Claude Code and is designed for orchestration at scale. As models improve, this factory-style approach is expected to outperform standalone agents by leveraging automation hooks, APIs, and parallel execution.
Gas Town is still in its early stages, and while compelling, it assumes a level of comfort with cutting-edge AI research and agent-centric workflows. (figure)

Setup And Installation Process
# Prerequisites
npm install -g @anthropic-ai/claude-code # Claude Code CLI
go version # Must be 1.21+
git --version # Must be 2.30+
# Install Gas Town
git clone https://github.com/steveyegge/gastown.git
cd gastown
go install ./cmd/gt
# Verify
gt --version
# gastown v0.3.1 (darwin/arm64)
# Initialize in your repo
cd ~/projects/payments-service
gt init
# → Created .gastown/config.yaml
# → Initialized gt-ledger branch
# → Worktree pool ready at .gastown/worktrees/
# Authenticate with Anthropic
gt auth login anthropic
# → Opens browser for Console OAuth
# → Credentials stored in ~/.gastown/credentials.json
# Start the daemon
gt daemon start
# → Gas Town daemon running (PID 48291)
# → Listening on /tmp/gastown.sock
# → Max concurrent polecats: 20 (configurable in config.yaml)Example: 50 Security Vulnerabilities + TypeScript Migration in 45 Minutes
Here is a realistic scenario. Your team has a Node.js monolith. A security audit returns a JSON report with 50 issues SQL injections, missing input checks, hardcoded secrets, and outdated dependencies. At the same time, the team must enable TypeScript strict mode across the whole codebase. Normally this would take 4–6 engineer-weeks. With Gas Town, it becomes a 45-minute token burn.
Step 1 : Feed the Backlog to the Mayor
# Load the security audit and TypeScript migration as two Bead sources
gt sling \
--backlog security_audit.json \
--backlog ts_migration_tasks.json \
--parallel 20 \
--witness-model claude-3-5-sonnet-20241022 \
--polecat-model claude-3-5-haiku-20241022
# Mayor agent output:
[Mayor] Ingested 50 security findings + 34 TypeScript tasks = 84 Beads total
[Mayor] Dependency analysis: 6 Beads have sequencing constraints
[Mayor] Independent Beads available for immediate parallel dispatch: 78
[Mayor] Spawning 20 worktrees...
[Worktree] Created: .gastown/worktrees/polecat-01 → polecat-20
[Mayor] Dispatching first wave: 20 Beads assignedThe Mayor broke the work into 84 tasks and saw that 78 could run independently. So it sent the first 20 tasks to 20 Polecat agents running at the same time.
Polecats use the faster and cheaper Haiku model to execute tasks, while the Witness uses the stronger Sonnet model to review the results. This keeps costs low while maintaining quality where it matters most.
Step 2 : Polecats Execute in Parallel
Each Polecat receives its Bead definition and gets to work inside its own worktree
# Polecat-01 Bead: "Fix SQL injection in src/handlers/auth.ts:47"
[Polecat-01] READ src/handlers/auth.ts
[Polecat-01] FIND Raw string interpolation: `SELECT * FROM users WHERE email = '${email}'`
[Polecat-01] WRITE Parameterized query using pg.query(sql, [email])
[Polecat-01] RUN npm test -- src/handlers/auth.test.ts
[Polecat-01] PASS 4/4 tests passing
[Polecat-01] COMPLETE → Bead moved to WITNESS_QUEUE
# Polecat-12 Bead: "Migrate utils/logger.js to TypeScript strict"
[Polecat-12] READ utils/logger.js (87 lines)
[Polecat-12] WRITE utils/logger.ts (renamed, typed, strict-compatible)
[Polecat-12] RUN npx tsc --noEmit
[Polecat-12] ERROR TS2339: Property 'level' does not exist on type 'LogConfig'
[Polecat-12] FIX Added 'level' to LogConfig interface definition
[Polecat-12] RUN npx tsc --noEmit → 0 errors
[Polecat-12] RUN npm test -- utils/logger.test.ts → 6/6 passing
[Polecat-12] COMPLETE → Bead moved to WITNESS_QUEUEPolecat-12 hit a TypeScript error, fixed it, checked the fix, and only then marked the task complete. This self-correction loop similar to how Claude Code works runs at the same time across all 20 Polecats.
Step 3 :The Witness Reviews Every Diff
Nothing gets merged without the Witness. The Witness agent checks the code changes from each Polecat and performs a structured code review.
# Witness reviewing Polecat-01's SQL injection fix
[Witness] DIFF src/handlers/auth.ts (+4 lines, -2 lines)
[Witness] CHECK SQL injection: parameterized query correctly implemented ✓
[Witness] CHECK Test coverage: existing tests still pass ✓
[Witness] CHECK No new issues introduced ✓
[Witness] APPROVE → Bead moves to REFINERY
# Witness reviewing a different Polecat's work
[Witness] DIFF src/services/payment.ts (+18 lines, -6 lines)
[Witness] CHECK Input validation added but schema does not cover negative amounts
[Witness] REJECT → "Validation schema incomplete. Add min(0) constraint to amount field."
[Witness] RETRY → Bead returned to Polecat-07 with rejection reasonThe Witness finds an error the Polecat missed the system doesn’t check negative payments. The Witness sends it back with a clear fix message. The Polecat corrects it, reruns tests, and submits again. The system repeats this automatically without human help.
Step 4 : The Refinery Merges and Triggers CI
# Refinery processes approved Beads
[Refinery] MERGE polecat-01 worktree → staging/security-batch-01
[Refinery] MERGE polecat-12 worktree → staging/ts-migration-batch-01
[Refinery] RUN CI pipeline (GitHub Actions trigger)
[Refinery] PASS All 247 tests passing on staging branch
# 45-minute session summary
[Gas Town] Session complete
Beads dispatched: 84
Beads merged: 71 (84.5%)
Beads rejected: 13 (15.5% all returned for retry, 9 subsequently fixed)
Beads still open: 4 (complex sequencing dependencies queued for next run)
Total API cost: $112.50
Polecat (Haiku): $34.20
Witness (Sonnet): $78.30
Estimated human time: ~60 engineering hours
Wall clock time: 47 minutesWhy State Persistence Matters
One of Gas Town’s most important but hidden features is the Beads ledger (Git-backed JSON log that records every task, state change, and history of work done by agents in Gas Town.) a JSON task log stored in a special gt-ledger Git branch. Each Bead keeps its full history: when it was created, which Polecat worked on it, Witness reviews, retries, and the final result.
If the daemon crashes halfway through, you can restart it and it continues from the last saved state. No work is lost and no Bead runs twice.
This is what makes Gas Town different from simply running many Claude Code sessions in parallel. The ledger acts like a factory log a single source of truth that records everything the agent swarm has done.
Gas Town turns the developer into an "Idea Compiler," where your primary job is designing implementation plans for a swarm of 30 agents to execute at the speed of thought.
Sponsored Ad
Free email without sacrificing your privacy
Gmail is free, but you pay with your data. Proton Mail is different.
We don’t scan your messages. We don’t sell your behavior. We don’t follow you across the internet.
Proton Mail gives you full-featured, private email without surveillance or creepy profiling. It’s email that respects your time, your attention, and your boundaries.
Email doesn’t have to cost your privacy.


