A new open-source tool called Sphinx makes developers prove they understand their AI agent’s code before it ships. According to Hacker News, where it launched as a Show HN post and picked up 180 points, Sphinx is a Git hook that stops a push and asks you a question about what the changed code actually does. Its tagline borrows a fake Sun Tzu line: “Outsource your thinking, not your understanding.”
The idea is simple. Coding agents can now write thousands of lines in one session, and a lot of that gets merged by people who never really read it. Sphinx adds a short checkpoint at the one moment every change has to pass through: git push.
How it works
As detailed on Hacker News, the flow has three steps:
- You push (or your agent does). Git pauses, but only on the branches you choose to protect.
- Sphinx asks. A reviewer model that never saw your chat with the coding agent reads the diff. Then it asks what the change does when things go wrong.
- You answer. Get it wrong and Sphinx explains why, then gives you a new scenario. Get it right and the push goes through.
The demo shows how pointed these questions can get. After an 11-file change (+5,012, -3,147 lines), Sphinx asks what happens when Stripe retries a webhook after the handler has started saving event IDs before calling charge(). The developer’s first answer is wrong. Sphinx corrects them and then pushes on a nastier edge case: the ID gets saved before the charge succeeds, so what happens if the charge fails? The correct answer is that the customer never gets billed. That’s a real production bug, caught by a quiz question. The project says the exchange is illustrative and that real questions come from your own diff.
5 things worth knowing
- It’s light on tokens. Sphinx says it’s “built to run on minimal tokens.” It can use your existing coding agent, OpenRouter, or any OpenAI-compatible endpoint, so you choose the model and you pay for whatever it uses.
- It works with the agents people actually use. Supported tools include Codex, Claude Code, Cursor, OpenCode, and Pi. It also works with plain Git and no agent at all.
- The reviewer is kept separate on purpose. The model asking the questions never sees your agent’s conversation, and your answers never reach the coding agent. That stops the agent from learning the quiz, and it means the reviewer judges the code on its own terms, not on the story the agent told about it.
- Secrets stay closed. Per the project, .env files and keys are never opened. That matters for any tool that reads your repo and sends content to an external model.
- There’s an escape hatch, and it leaves a record. Running
sphinx yololets pushes through when you’re in a hurry, but every skip is logged. Teams can see exactly how often people bypass the check.
Getting started
Sphinx installs from npm with npm install -g sphinx-understand, then sphinx install. That second command connects Git to your coding agents and asks which model should do the reviewing. After that you push as usual. You need Node 22.19 or later on macOS, Linux, or WSL. The launch post doesn’t mention a paid tier, so the main cost is the model calls on whatever endpoint you pick.
Why this matters
What stands out here is the problem Sphinx goes after. Most AI code review tools try to find bugs for you. Sphinx checks whether you understand the code, which is a different problem and probably a more important one. When an agent writes the code and another AI reviews it, the human can end up approving work they couldn’t explain. Then when it breaks at 3 a.m., nobody on the team knows how it works.
There are fair caveats. A quiz on every push adds friction, and plenty of developers will hit sphinx yolo the moment they’re on a deadline. How good the questions are depends on the reviewer model you choose. And a correct answer to one scenario doesn’t prove you understand a 5,000-line diff. Still, the questions focus on failure cases (retries, timeouts, partial failures), and those are exactly where agent-written code tends to hide its worst bugs.
Expect more tools like this as agent-written code becomes the default. The next step is likely team-level use: protected branches where understanding checks sit next to tests and CI. Full setup details are in the project’s documentation, linked from the original Hacker News post.