# Sphinx — a git hook that quizzes you on your agent's code before a push

> Before agent-written code is pushed, Sphinx asks what it does when things go wrong, and lets the push through once you answer.

- Org: parthh01
- Date: 2026-10-16
- Category: tool, repo
- Source: https://sphinx-six-theta.vercel.app/
- Canonical page: https://ai-tldr.dev/releases/parthh01-sphinx/

## In short

Sphinx is an open-source git hook that stops a push to a protected branch until you correctly predict what the change does. A separate reviewer model writes the questions from the diff. Works with Claude Code, Codex, Cursor, OpenCode and Pi. MIT.

## What it is

Sphinx is a comprehension checkpoint for agent-assisted development: when you or your coding agent push to a protected branch, git waits while Sphinx asks you to predict how the change behaves. A wrong answer gets an explanation and a new scenario on the same concept; a right answer lets the push continue. Its tagline is "outsource your thinking, not your understanding."

## How it works

The questions come from a separate reviewer model that reads the committed change through read-only git tools and never sees the conversation that wrote the code. It asks about behaviour, failure modes and invariants rather than file names, scales from one to three questions with change size, and uses a signed-in Codex or Claude Code CLI, OpenRouter, or any OpenAI-compatible endpoint. .env files and private keys are excluded by default.

## Why it matters

Developers who let agents write most of their code can ship changes they never understood. Sphinx makes that understanding a step in the push itself, while the agent only sees check status, never your answers. The README is clear that it is practice, not a security gate: anyone with local access can skip it with sphinx yolo, which logs every skip.

## Who it's for

developers who ship code written by coding agents

## Try it

npm install -g sphinx-understand && sphinx install

## Links

- [Website](https://sphinx-six-theta.vercel.app/)
- [GitHub Repo](https://github.com/parthh01/sphinx)
- [Show HN](https://news.ycombinator.com/item?id=50137950)
