Test-first bug fixes

A bug is fixed when someone else's test says so.

You describe the bug to Claude. Codex turns it into a test that fails, and Claude then works on the code until that test goes green. Claude never wrote the test, so it has nothing to quietly bend toward its own fix.

Free and open sourceRuns on Mac and LinuxYour own Claude and Codex logins
Codex's test report arriving in a Claude Code session in Overvibe, with the test result in the message
Recorded on a demo machine: Codex's message with its test result, delivered into the Claude session.

"Fixed" usually means it passed a test the fixer wrote

Let one model write both the fix and the test and the test ends up checking what the fix does. The bug you reported can still be there after a green run.

One agent on its own
  • The fix and its test come from the same head
  • A green run you only half believe
  • The repro lives in a chat message somewhere
  • You rerun everything yourself, just in case
Agents side by side in Overvibe
  • Codex writes the repro as a real failing test
  • Claude has to pass a test it didn't write
  • The test stays in the repo for next time
  • Both terminals show the run going red, then green

Red, then green, from two different agents

  1. 1Describe the bug once

    Tell Claude in plain words, with the steps that reproduce it.

  2. 2Codex writes the failing test

    Claude starts it. Codex adds the test and reports that it fails for the right reason.

  3. 3Claude fixes the code

    It changes the code and leaves the test alone until the suite passes.

  4. 4Codex checks again

    Codex runs it one more time to close the loop, then Claude closes the helper.

Behind it, one handoff each way. The first command puts Codex on the test. Its reply lands in Claude's session. Read the CLI reference

$ overvibe new --attach --tool codex --cwd . --name "web: failing test" \
    --prompt "Write a test that reproduces: totals ignore discounts. Confirm it fails. When done, run: overvibe send \"$OVERVIBE_SESSION\" \"<test and failure>\""
# Claude fixes the code, then asks for the confirming run
$ overvibe send "web: failing test" "Fix is in. Run the suite again and report."

Questions

What keeps Claude away from the test?

Your instruction, plus the fact that you'd see it. Tell Claude the test file is off limits; any edit to it shows in the terminal and in git.

Will it work with my test runner?

It should. The agents run whatever your project already uses (bun test, pytest, go test) in their own terminals.

Can Claude write the test and Codex do the fix?

Sure. Claude Code, Codex and agy can each take either side.

Other ways to pair agents up

Make your next fix prove itself

Install Overvibe and ask Claude to get a failing test out of Codex before it touches any code.

The Overvibe app: a coordinator with its Codex and Gemini (agy) helpers in the sidebar, each with its status, and one session waiting on you