Cosmic

Case Study

Autonomous agent control plane

23 PRs in one 8-hour run, for $1.42

Custom production app · AI engineering

Diagram of four parallel agent runs across eight hours, with a failure recovered from a checkpoint and a budget meter

The goal

Ship production code changes overnight for cents in model spend, with engineers reviewing finished pull requests in the morning instead of watching agents all day.

The problem

Long coding-agent runs fail quietly. Agents mark work complete with checklist items still open, tests pass while the bug survives, features ship switched off, and context drifts after every reset. One false "complete" cost $238 before anyone caught it, and supervising every run by hand erases the savings.

What we did

Every run gets a time budget and a dollar cap, and every sprint works in its own git worktree, so parallel agents never write to the same checkout. Work moves through planning, architecture, implementation, QA and pull-request stages, and each stage has its own verifier.

A completion gate refuses "done" while any checklist item is open. Merge gates check behavior and front-end output before auto-merging. Circuit breakers halt new sprints until a person clears them, and a baseline check stops any run that starts on failing tests. Each sprint writes an event log and a report, and a narrator posts a one-line status every five minutes.

The results

What it does for revenue

Margins
Model spend on the longest run averaged about 6 cents per pull request. Engineering hours go to reviewing finished work, which is where the judgment is.
Speed to market
The backlog keeps moving while the team is offline. An 8-hour overnight run produced 23 pull requests ready for review the next morning.
Cost
Hard dollar caps and circuit breakers stop a runaway run before it burns budget, the failure that cost $238 before the gates existed.

Want results like these?

Get a free Revenue Discovery Call

← All work