codetiller
Open source software factory: GitHub issue in, verified draft PR out. Coding agents run as sandboxed, untrusted workers with a human in charge.
- TypeScript
- Node.js
- Hono
- React
- Docker
- Kubernetes

Image 1 of 5: codetiller dashboard: tasks that need a human, and closed tasks with state, repo, runs and cost
Coding agents are good enough to fix real issues. What's missing is everything around them. Who decides which task an agent takes? Where does it run, and what can it reach? Who checks that "done" means done? And when you change the prompt or the model, how do you know it got better?
On a laptop, the answer to all of these is "me, watching the terminal". codetiller is my attempt to answer them with a system instead: CI/CD for work done by AI agents.
issue → preflight → queue → sandboxed agent → verification → draft PR
→ human review → agent resumes on feedback → merge (human)The story of how I got here, and what didn't work, is in From Vibe Coding to Software Factory. This page is about how it's built.
Three Rules
The whole design comes down to three rules:
- A human queues every run. Importing an issue creates a task and stops. A button, a CLI command or a
/tillercomment on the PR says "work on this now". Agents never start themselves. - The factory decides whether a change is verified. The agent saying it's done is where verification starts, not the result.
- A human merges. The factory opens draft PRs and never merges one.
A Task Is Not a Run
The first version treated every agent run as a separate job. That broke the moment a human answered a question or left a review comment: the next run started from scratch.
So a task is the unit of work. It keeps a persistent workspace, its branch, its PR and the agent's session. A run is one execution on that task: the first attempt, then one for each answer or review comment. Questions, answers and review rounds are part of the task, not failures of a run. A follow-up run picks up the conversation where the last one stopped.
Every task moves through explicit states (IMPORTED, QUEUED, PREFLIGHT, RUNNING, WAITING_FOR_HUMAN, PR_OPEN, COMPLETED, …), so the dashboard always shows who is waiting on whom.
The Agent Is Untrusted
An agent with a shell reads issue text, dependency READMEs and web pages. Any of those can carry a prompt injection. So the agent runs as an untrusted worker:
- Its container is non-root, has no capabilities and sits on a network with no route out.
- It reaches exactly one thing: a model gateway. The gateway forwards model calls, adds the real API key and refuses everything else, including server-side tools like web fetch or remote MCP that would be a way out through the model API itself.
- The key the agent holds is a random name for its run. Once the run ends, it's useless.
- The gateway enforces the run's model and budget. The agent can't raise either.
- Dependency installs get a different single exit: a registry proxy that reads only from the configured package registries.
- The factory commits from a git directory the agent can't reach and never runs git inside a directory the agent could write to.
- Text the agent writes (PR bodies, comments) is made inert before posting: no images that could leak data, no
@mentions, noFixes #Nclosing unrelated issues.
None of this is theoretical. My first sandbox had an open network, the API key in the environment and the factory's own API reachable from the container. I found out by writing tiller audit: probes that run inside the same container a real run gets and try to get out. Now they all pass, and agents finish the same tasks as before.
"Done" Is Decided by Plain Code
After the agent says it's done, the factory exports a clean copy of the commit and runs the full test suite and the repository's checks in a fresh container with no network.
A few details matter more than they look:
- Baseline. The same suite runs at the commit the task started from. Only tests that passed there count, so an already broken test isn't held against the change.
- Removed tests fail. A test that passed at the baseline and no longer runs is a failure. "Make the tests pass" sometimes turns into "delete the tests".
- Changed check files are flagged. If the agent edits the test config or the CI file, verification says so.
- Second reader. Optionally, a read-only agent reads the diff against the task and reports code that works on the checks instead of the behavior. It's advisory and never blocks, because it's an agent reading text an agent wrote.
The Repository Owns Its Setup
Each repository describes itself in .factory/factory.yaml: how to install dependencies, how to run tests, which checks to run. One file can cover several toolchains:
sandbox:
toolchains:
- lockfile: pnpm-lock.yaml
setup: pnpm install --frozen-lockfile
deps: [node_modules]
test: vitest run --reporter=json --outputFile={{out}} {{files}}
parser: vitest-json
suites:
- name: api
lockfile: api/go.mod
setup: (cd api && go mod download)
test: cd api && go test -json ./... > {{out}}
parser: go-test-json
checks:
- name: go vet
run: cd api && go vet ./...
preflight:
max_files: 20tiller repo add writes a first version for JS/TS, Go and Python repositories. The team reviews it like any other code change.
Every Run Is Eval Data
codetiller started as a benchmark engine, before there was a factory. It mines tasks from a repository's history: an issue-like description, the base commit, and the maintainers' tests kept hidden from the agent. Then it compares two agent configs on those tasks.
That engine taught me the most important lesson of the project. A "self-improving" loop that learned lessons from failed runs raised success on the training tasks from 67 % to 92 %, and did nothing on held-out tasks. It had memorized the answers. Later I measured rerun noise and found that, at the scale I could afford, differences under about 7 percentage points were noise.
So the eval engine became a gate: a change to a skill or a config ships as a pull request with a measured comparison on a holdout, next to the noise band. Every run also writes a manifest (commits, config hash, model, image, prompt and skill hashes, human messages), so any result can be traced back to exactly what produced it.
Architecture
About 23,000 lines of TypeScript in a pnpm monorepo:
packages/core engine: tasks, runs, PRs, sandbox, verification, store, evals
packages/cli the `tiller` CLI
packages/server HTTP API (Hono) over the store and run artifacts
packages/web dashboard (React + Vite)
images/base sandbox image: agent CLI, Node, Go, Python
images/gateway model gateway and registry proxy (plain Node, no dependencies)
images/factory the factory itself as an image
deploy/ compose file, install script, Kubernetes manifestsIt installs on one Linux host with Docker Compose, or on Kubernetes, where every sandbox is a pod. The gateway has no dependencies on purpose: it's the piece that holds the key, so it should be small enough to read in one sitting.
What I'd Do Differently
Build the trust boundary first. I built the happy path, then audited it, then rebuilt the network around a gateway. Starting from "the agent is hostile" would have saved a rewrite.
Measure noise before measuring effects. I reported several skill improvements before I knew what a rerun of the same config does. None of them survived.
Personal token as the GitHub identity. It was the fastest way to get PRs open, but agent work shows up as me. A GitHub App with its own identity is next on the list.
Status
Young, but the core path works end to end: issue to draft PR with Claude Code, GitHub review comments and CI, JS/TS, Go and Python repositories, Docker and single-node Kubernetes, benchmarks and the eval gate, and a dashboard with timelines, transcripts, diffs and metrics.
Not built yet: sign-in and roles, a GitHub App, other agents (Codex, OpenCode, local models), and runs across several cluster nodes.
It's open source under Apache-2.0 and self-hosted. Docs and install: codetiller.ai. Source: github.com/TT-Labs/codetiller.