How Rokan fixes an agent
Four steps, shown on a real run: an open bug in the official MCP git server, fixed for $0.77. Every artifact on this page comes from that run.
-
01
Watches
Connect the platform your agent runs on and Rokan checks new runs every 15 minutes. Or upload 20 to 200 runs in any export format, with nothing to install.
It looks for the failures that raise no error: the agent sounded right and did the wrong thing. Here, the first tool call "worked", and every call after it failed.
Retell · Vapi · ElevenLabs · Synthflow · LangSmith · Langfuse, or upload any export
Tool calls, from issue #5641Real git_branch" feature\n* main"okgit_checkoutRef '* main' did not resolve to an objecterrorgit_diffRef '* main' did not resolve to an objecterrorgit_showRef '* main' did not resolve to an objecterrorgit_mergeRef '* main' did not resolve to an objecterror
-
02
Catches
Before any fix exists, Rokan proves the bug: a test that fails on today's code, then a check that every fix must pass.
The check fed git_branch's output to the four tools that use it, in nine branch states. On today's code it failed in all nine, so it really catches the bug.
tests/test_branch_listing.pyFails on today's code def test_local_active_branch_has_no_marker(work): work.git.branch("feature") > assert names(git_branch(work, "local")) == ["feature", "main"] E AssertionError: assert [' feature', '* main'] == ['feature', 'main']Downstream check on today's code 9 of 9 states fail
- branch_type_local
- branch_type_remote
- branch_type_all
- current_item
- slash_name
- detached_head
- remote_head_symref
- forced_color
- worktree_branch
-
03
Proves the fix
Three fixes compete, each from a different idea of where the bug is. Every attempt runs the repo's own suite and the new check.
Five attempts broke existing tests and were sent back. All three ended up passing; code, not a model, picked the smallest change at the source.
Every attempt, in the order Rokan judged itReal - producer1 failed, 169 passedBlocked
- consumer1 errorBlocked
- helper1 failed, 169 passedBlocked
- helper4 failed, 509 passedBlocked
- helper2 failed, 5 passedBlocked
- producer9 of 9 states · 27 code linesPicked
- consumer9 of 9 states · 31 code linesPassed
- helper9 of 9 states · 30 code linesPassed
Picked the fix at the source (git_branch): it passed every check and the downstream check, with 27 code lines.
-
04
You approve
For a conversation agent you get a prompt or rule change, scoped to the customer that broke and replayed on past conversations. For a bug in code you get the change, its regression test and a write-up.
Nothing ships until someone on your team approves it, and any change rolls back in one click.
The pull request Rokan wrote for #5641PRs to your repo: early access Fix git_branch: git_branch returned raw
git branchdisplay output- New test fails before, passes after
- 210 tests pass, 9 of 9 branch states work
- No CI, dependency or config file touched; no test deleted
Check by handExisting tests changed because they asserted the old output. If the team pinned that output on purpose, this fix changes a contract: decide that here.ApproveRequest changes
What Rokan can't do yet
- The replay of past conversations is a model playing the user's side against the agent's prompt and rules. It does not call the agent's real tools or voice stack, so it does not re-test speech-to-text, audio or a live backend.
- It does not yet open pull requests on your repository. GitHub connect is in early access; the code fix arrives as a local branch.
- Fix results so far come from public code and a public benchmark, not from customer agents.