Stop Letting AI Agents Approve Their Own Code: Two-Repo Split, Cross-Model Review, and a $40 Cloud Test VM A developer running up to four parallel AI coding agents on a 16 GB MacBook described splitting their quantitative research codebase into two separate Git repositories, adding cross-model code review, and routing tests through a shared cloud VM to stop agents from approving their own work. The setup, which backs nearly 7,000 tests, uses per-invocation execution IDs, SHA-256 config hash checks, and a dedicated exit code (4) to block runs whose output is missing or tampered with even when the subprocess returns 0. I run up to 4 AI coding agents in parallel on a 16 GB MacBook. Whenever two of them launched full pytest runs at the same time, macOS hit swap immediately and froze. Worse, when I let the same agent edit code, run tests, and report success, it sometimes relaxed assertions to make a failing test pass or returned an exit 0 from stale artifacts left in a shared directory. Telling an LLM in a prompt to "be careful" or "don't touch unrelated files" stops working once the context window fills up. I replaced prompt-based discipline with hard repository boundaries, cross-model code review, and a shared cloud test runner. This setup currently backs my personal quantitative research codebase with nearly 7,000 tests, and every piece of it works just as well for any Python or backend project. When all my code lived in one repository, an agent fixing a data loader bug could casually edit the task scheduler or read out-of-sample validation data from an exploratory script. No amount of Markdown instructions stopped that reliably. I split the system into two separate Git repositories: task manager quantation factor database tools.agent harness.cli and has zero scheduling privileges. | Approach | Risk of Cross-Module Edits | Concurrent Merge Conflicts | Trade-Off You Accept | |---|---|---|---| | Single repo + prompt rules | High after long sessions | High | Constant manual cleanup | | Monorepo with folder rules | Medium direct imports still work | Medium | Painful to split out public code later | | Two separate Git repos | Low process and repo boundary | Low independent test suites | Must maintain a strict CLI and JSON contract | Splitting into two repos does add overhead. Every cross-repo change requires updating the CLI flags and JSON schema on both sides, and we use Copybara to export allowlisted parts of the execution repo to our public open-source project GSX-Eis/jq-factor-lab https://github.com/GSX-Eis/jq-factor-lab . In return, an agent working on computation can never touch scheduling rules. Letting one model write a patch and verify it is an easy way to get false positives. A single model has blind spots around its own assumptions, and when a test fails, it often tries to work around the failure by loosening an assertion or returning a default value so the process exits with 0 . I also ran into silent cache bugs where a script exited 0 after writing an empty file, or a wrapper read an old report left behind in a shared output folder. To stop both failure modes, I split work across four steps and different model families: worktree , so 4 agents never overwrite each other's files. --no-ff in a temporary When human planning docs and code disagree, agents often copy stale commands from an outdated README. I added a strict precedence rule in AGENTS.md at the repo root: CLI --help output highest authority schemas/ README.md .planning/ , background only, never copy commands from here Our CLI wrapper separates "the subprocess didn't crash" from "the output is valid." Every invocation gets a fresh execution id , writes to attempts/