Two AI coding agents, one repo: what broke
Two AI coding agents in one game repo: checks that tested nothing, red CI on a fresh checkout, and the rules that keep both agents honest now.
By Piotr Prędkiewicz · Published , updated · Devlog · Auf Deutsch lesen
I build my first puzzle game, Path Flow: Tap Logic Puzzle, with two AI coding agents in one repository: Claude Code and Gemini in Antigravity. Most of what went wrong was not the code the agents wrote. It was the proof that the code worked.
Short answer: two AI coding agents stay honest in one repo when every check has been seen failing, the gate runs on a fresh checkout instead of anyone’s machine, and both agents read the same rules, which a CI check keeps identical.
Key takeaways:
- A green check proves nothing until you have broken the thing it covers and watched it turn red.
- “Green on my machine” means little when two agents work in one repository. The gate has to run somewhere neither of them touched.
- Two agents need one set of rules. Mirror the rule files and let CI fail when they drift.
- Every task leaves evidence behind: the criteria it had to meet and the output that showed it did.
How can a test suite be green while the game is broken?
The first Android build of the game could not be pressed at all. Every button was dead on a touchscreen, and the board under the menus could not be reached. The whole test suite was green.
Two faults caused it, both invisible on a desktop: touch input was not passed on as mouse clicks, and full-screen interface layers swallowed every tap meant for the board below. Worse, one test asserted the first fault as a requirement. It checked that the setting stayed exactly the way that made the game unusable.
When I went through the checks afterwards, 17 of them had been green while testing nothing. A few of the patterns, in words:
- A check searched the log for warnings, in a mode that never prints warnings.
- A check relied on “the run exits with an error on failure”, but in debug mode a crash still exited cleanly.
- A check compared each arrow’s position with the function that had placed it, so it agreed with itself even with the board pushed far off screen.
- An evidence file that was meant to prove the checks had teeth flipped its own result twice and reported a clean sweep for five regressions nobody had tested.
Four more turned up later, found by separate QA agents whose only job was to break things, not by the gate.
What is the rule now?
Green proves nothing until you make it red. Before a check counts, someone plants the bug it is meant to catch, in a scratch copy outside the repository, and watches that exact check fail with its own message. A plant that turns a different check red proves nothing about the one under test.
In the first three rounds after the rule, the checks caught 13 of 13 planted regressions. When the gate cannot judge something, an agent gets the rules in plain words, one planted regression and a small budget, and has to break it.
Why was everything red on a fresh checkout?
The first runs of the CI gate failed before a single test ran. The reason was dull: git held the game’s source assets, but not the files the engine generates when it imports them. On my machine those files existed from earlier sessions. On a clean runner they did not, so nothing loaded.
The fix was one step: install the pinned engine version (Godot 4.5.1) and run a headless import before the tests. The more useful outcome was where the gate now lives. It runs on every pull request, on a clean machine. Agents run only the suites they touched while they work; the pull request run is the one that counts. With two agents working in one repository, “it passed for me” stopped being an answer anyone could give.
How do two agents share one repository?
| What broke or could break | How it showed | What runs now |
|---|---|---|
| Checks that cannot fail | Green suite, dead build | Plant the bug, watch the check go red |
| Missing generated files | Red CI on a fresh checkout | Headless import, gate on every pull request |
| Two agents, two sets of rules | Same task, different behaviour | Mirrored rule files, CI fails on drift |
| Work that cannot be checked later | ”Done” with nothing to look at | An evidence folder per task, with criteria |
Each agent reads its own rule file: Claude Code reads CLAUDE.md, Gemini reads GEMINI.md, other tools read AGENTS.md. The files are kept identical, and CI fails when one of them drifts. Every rule in them comes from something that went wrong, written as the shortest sentence that would have prevented it.
The agents work in separate git worktrees, so they never edit the same checkout at the same time. Tasks move through a queue of folders, from backlog to done. Every task leaves an evidence folder with its acceptance criteria and the output that proves them; there are more than 170 of them now. Design choices that would otherwise be argued again go into decision records, more than 60 so far, and a superseded decision gets a new record instead of being rewritten.
What would I do differently?
Write the falsification first. Before trusting a new check, break the thing it covers. It takes minutes, and it would have caught most of the 17.
What to do tomorrow if you run coding agents
- Pick your five most important checks and plant the bug each one claims to catch. Count how many go red.
- Run your test gate on a clean checkout in CI, with pinned tool versions, and treat that run as the only verdict.
- Put the agents’ instructions in one rule file per tool, keep them identical, and fail the build when they differ.
- Give each agent its own worktree.
- Ask for evidence per task: the criteria, the command that checked them, and its output.
The game is still in development, with no release date yet. The way it gets built is the part I can already share. I am open to senior marketing analytics and analytics engineering roles and to project work on agent workflows; you can reach me through predkiewicz.com.
predkiewicz.com: Piotr's notes on marketing analytics and growth data
Piotr on LinkedIn: new devlog posts and notes