Work on main with a coding agent
Check every commit your coding agent makes on main, or a whole span of commits when you ask.
Where the check fits
You and your coding agent commit straight to main, so there's no pull request to hang a check on. Start it from the commit instead. The check runs in RunStory's sandbox while you keep working, and it never blocks a commit.
The same five commits, checked two ways: one check for each commit, or one check for the four commits after a1c4e07.
| Every commit | A span of commits | |
|---|---|---|
| Starts | By itself, after each commit | When you or your coding agent run one command |
| Tells you | Which commit broke something | What's broken at the end of the span |
| Reads | The commit, its diff, and the coding requests behind it | The commits in the span and their combined diff |
| Costs | One check for each commit that changes code | One check |
Check every commit
-
Set up the repository once.
runstory initinstalls the commit hook, plus a hook that hands findings to your coding agent.runstory setupstarts your app in the sandbox, so you can see it boot.runstory init runstory setup -
Turn on automatic checks in your own terminal.
runstory settings --automatic onRunStory shows the price, like "Each commit starts a check of 6 credits, paid by your personal account", and asks you to type yes.
-
Keep working. Each commit that changes code now starts a check in the background.
Your coding agent can't turn this on. If it runs the same command, nothing changes.
RunStory skips what it can. Once you have a first result, a commit that only touches files that don't run, like a README, is skipped and costs nothing. A quick burst of commits, like a rebase, gets one check of the newest.
Check a span of commits
Leave automatic checks off, and start one check when a piece of work is done. Name the commit the work started from, then two dots.
runstory run a1c4e07..
| You type | RunStory checks |
|---|---|
runstory run | The newest commit |
runstory run HEAD~4.. | The last 4 commits, as one change |
runstory run a1c4e07.. | Every commit after a1c4e07 |
runstory run v1.2.. | Every commit since the tag v1.2 |
RunStory builds and runs the newest commit in the span, and studies the whole change. Add --dry-run to see what a check would cover before you spend anything.
$ runstory run a1c4e07.. --dry-run
Checking a1c4e07.., 4 commits from a1c4e07 to main (e55a2b9), with 6 files changed
...
This check runs 2 agents and costs 6 credits. You have 41 credits left.
Nothing was sent, because you passed --dry-run.
Ask your coding agent to do it
Your coding agent starts a check only when you ask. runstory init tells it so, in a short section it adds to AGENTS.md. So ask in the same request as the work, and name the commit the work starts from.
Ask your agent
Add gift cards to checkout, and commit as you go. When you're done, run one RunStory check of every commit since a1c4e07, then fix what it finds.
The agent runs runstory run a1c4e07... It tells you the price first, and starts the check once you agree.
What comes back
A check can run for up to an hour, so the result arrives while you're on to the next thing.
- To your coding agent. At the end of its turn, it gets each new finding. This works in Claude Code, Codex, and Cursor.
- To you.
runstory statusshows what finished. Each check also has a web page, with a video of the browser when your app is a web app. - With proof. Each finding has an id, a script that repeats the failure, and what that script did on the commit before your change.
When your agent commits a fix, it names the finding's id in the commit message. Then it runs the finding's script again, 3 times, in the sandbox. That retest costs no credits, and 3 passes close the finding.
runstory findings retest f-3a9c41d27b6e
Example: a checkout change on main
A developer at Acme, an online furniture store, works on main with Claude Code. Automatic checks are on.
- The developer asks: "Let customers edit their delivery address during checkout."
- Claude Code changes the checkout code and commits
30f9a6c. The commit hook starts check 59. - RunStory builds the store from
30f9a6cand starts it. Its agents add 2 items to the cart, change the delivery address during checkout, and find the cart empty. - The failure's script repeats it 3 more times, and a second agent confirms it. The same script passed on
7be29d3, the commit before. - At the end of its next turn, Claude Code gets finding
f-3a9c41d27b6eand its script. - It fixes the code and commits
9b2f4d1, "Keep the cart when the address changes (f-3a9c41d27b6e)". Then it runs the retest.
$ runstory findings retest f-3a9c41d27b6e
Re-test, setup 6, at 9b2f4d1
f-3a9c41d27b6e Its test passed 3 times at 9b2f4d1, so it is closed.
What it costs
A default check uses 2 frontier models and costs 6 credits. With 1 model, it costs 3.
| To | Run |
|---|---|
| Cap this project's checks at 30 credits a day | runstory settings --daily-limit 30 |
| Check with 1 model | runstory settings --providers anthropic |
| Check a commit that would be skipped, like a README edit | runstory run --full |
| Pause automatic checks | runstory settings --automatic off |