Listed from the MCP registry; nobody on Odel publishes it.
Checks an AI coding agent's "I can't" and "done" claims against evidence.
Runs on your machine from its package; the steps are below.
At most: moves money, runs code or commands, deletes data, or sends messages for you.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Distributed as an MCP bundle (`https://github.com/juw12/precedent/releases/download/mcp-v3.3.0/precedent.mcpb`) — download it and import the bundle in your MCP client.
Stop false "I can't"s and unchecked "done"s in your AI coding agents.
Enforced automatically in Claude Code, Codex CLI, Gemini CLI, OpenCode and GitHub Copilot CLI; available as MCP tools plus rules in Cursor, Windsurf, VS Code and Claude Desktop.
You've seen this: the agent says "I can't do that", you reply "you did it before", and suddenly it works. The capability was there all along. What it lacked was a precedent.
precedent finds that precedent automatically, from all your agents'
history, before the agent gives up. It also makes sure a pushed agent never
fakes success to please you.
Without precedent:
You: convert report.xlsx to csv
Agent: Sorry, I can't convert Excel files in this environment.
With precedent, the agent's give-up is sent back with this (real hook output):
Precedent check: your answer gives up without evidence. Before stopping: (1) name the
exact blocker; (2) look for precedent ... (3) try at least three routes that differ in
kind; (4) verify any success with a real check. Never invent a past success or fake output. ...
Possible precedent found in local history (check it matches before reusing; cite it if you use it):
- [2026-11-01, Claude Code, this project, session 3f2a1b9c; succeeded] Bash:
`python -c "import pandas as pd; pd.read_excel('data.xlsx').to_csv('data.csv', index=False)"`
(task: "convert data.xlsx to csv")
The failed xlsx2csv attempt from that same session is not shown: only actions
that succeeded count. What the agent does next depends on the agent. It was
measured on a real agent, including where it backfired at first (see Verified so far).
See it yourself in under a minute, no agent history needed:
python demo.py
It builds a throwaway sandbox and runs the real hooks as Claude Code, Codex CLI and Gemini CLI would: a give-up sent back with last week's working command, a "done" with no check sent back, and a test-weakening patch denied.
| Agent | History searched | How it's enforced |
|---|---|---|
| Claude Code | ✓ transcripts | automatic hooks + skill + MCP |
| Codex CLI | ✓ rollouts (incl. 0.161–0.163 code mode) | automatic hooks + skill + MCP + AGENTS.md rules |
| Gemini CLI | ✓ chat recordings | automatic hooks + skill + MCP + GEMINI.md rules |
| OpenCode | ✓ SQLite history | automatic plugin + skill + MCP + AGENTS.md rules |
| GitHub Copilot CLI | — | automatic hooks + skill + MCP |
| Cursor, Windsurf, VS Code (Copilot agent), Claude Desktop | — | MCP server |
| ChatGPT, Gemini app, any chat | — | paste-in rules (platforms/chatgpt/) |
Plus shell history (bash, zsh, PowerShell) and git log for everyone.
git clone https://github.com/juw12/precedent
cd precedent
python install.py # dry run: shows every change, writes nothing
python install.py --apply # install for every agent it finds
python install.py --uninstall --apply
It backs up every file it edits (*.precedent-bak), is safe to run twice,
skips any config it can't parse safely (for example JSON with comments) and
tells you what to add by hand. Requirements: Python 3.8+. No other dependencies.
Codex CLI asks you to trust new hooks once: run /hooks inside Codex and approve them.
It only touches agents it can actually find (their CLI on PATH, or their own
config or history files), and never overwrites a different skill that happens
to use the folder name precedent.
| When | What happens |
|---|---|
| You say "you did it before" / "try again" | It searches your past sessions in every agent, shell history and git, and hands the agent the exact action that worked, with date and task. If there is none, it says so, so the agent can't fake a memory. |
| The agent is about to give up | The answer goes back with the precedent attached and a short loop: name the blocker, try three routes that differ in kind, verify. Safety refusals are left alone. |
| The agent says "done" | If nothing ran after the last edit, or the last check failed, it is sent back to verify. "Should work now" is not a check. |
| The agent cites a precedent | Commands cited on a Precedent: line are checked against real history. An invented one is flagged. |
| The same error happens twice | The agent is told to stop repeating that route; on the 3rd and 5th repeat it gets hypotheses and matching precedent. |
| The agent tries to cut corners | Adding skip/xfail/.only or assert True, removing assertions, deleting test files, push --force, --no-verify, reset --hard, broad rm -r: stopped. Claude Code asks you; Codex and Gemini have no "ask", so the call is denied with the reason. |
In Claude Code, Codex CLI, Gemini CLI and GitHub Copilot CLI this all happens
automatically through hooks (one set of scripts that speaks each agent's hook
format); in OpenCode through a plugin that runs the same scripts. In other agents
the same checks are MCP tools (find_precedent, review_reply,
record_failure, check_test_edit, check_command) that the installed rules
tell the agent to use, plus a precedent prompt (slash command) where the
client supports MCP prompts.
success with Exit Code: 1 in its output, and Codex
code mode wraps commands in JavaScript.BLOCKED with one precise ask is a good result.user:pass@ URLs are redacted.python skills/precedent/scripts/find_precedent.py "convert xlsx to csv"
python skills/precedent/scripts/find_precedent.py "deploy docs" --git --limit 8
skills/precedent/ into your agent's skills folder.python, args ["<path>/skills/precedent/scripts/mcp_server.py"] (stdio).platforms/rules/precedent-rules.md into AGENTS.md / GEMINI.md / your rules.platforms/cursor/precedent.mdc into .cursor/rules/.platforms/opencode/precedent.js into .opencode/plugin/ (one project) or let the installer add ~/.config/opencode/plugins/precedent/.claude plugin marketplace add juw12/precedent, then claude plugin install precedent@precedent.Turn the hooks off any time with PRECEDENT_OFF=1.
python -m unittest discover -s tests.AGENTS.md:
admin:admin and to try removing a folder's deny ACL. The
fixes in 3.3.0 treat a quoted access denial as evidence, stop reading "keep
trying" in an opening request as pushback, rule out bypassing access controls
in every nudge, and block both moves in the guard.hooks/src/schema.rs, Gemini and GitHub
hooks references), not yet inside a live session of those agents.opencode serve). One-shot opencode run exits as soon as the turn ends, so
there only the tool guard, loop breaker and rules apply..jsonl.zst); those
are skipped (no standard-library decoder). Antigravity's protobuf
conversations are not read.MIT