Your coding agent doesn't know about the bug in your exact version.
landmine reads your lockfile, finds the open GitHub issues filed against the versions you pin, and puts them where your agent reads them, with the workaround from the thread. Before it writes the code that hits them.
$npx landmines scan && npx landmines install --rulesuninstall removes it all.
await db.$client.end(). The landmine hook flagged a known bug in drizzle-orm 0.36.0 (#3402). I avoided that by creating the pool myself.Told up front, the agent steps around it.
We built landmine-bench: 21 held-out tasks from bugs filed after the model's training cutoff, each a feature request whose obvious implementation hits an open upstream bug. A hidden test decides.
Claude Sonnet 5.5 pass rate with landmine's known-bugs section in CLAUDE.md (72/84 → 83/84 runs).
Wins and losses in a confirmation run on unseen seeds, written down before it ran. p = 0.03.
Against what you'd use instead
passed / 42Sonnet 5.5, 21 tasks × 2 seeds, one batch. With web search and Context7 available, the agent used neither in 84 sessions: it didn't think to look.
A short list, in the file it already reads.
landmine rules writes a marked section into AGENTS.md and CLAUDE.md: the open issues for your exact versions, ranked by the APIs your code actually calls, each with its workaround.
- Only issues that name the version you pin, each checked against the thread.
- Tied to code symbols, so the agent knows which call to avoid.
- Framed as untrusted third-party text. The agent is told never to follow it blindly.
Lockfile in. Known bugs out. Before the edit.
Scan
Lockfile → exact versions → the open GitHub issues that name them. Each hit is checked for the version, tied to code symbols, and given the most useful workaround from its thread.
npx landmines scannpm · pnpm · yarn · bun · uv · poetry · pip
Tell the agent first
The known-bugs section above, in AGENTS.md and CLAUDE.md. This is the part that measured as working.
npx landmines install --rules86% → 99% on landmine-bench
Backstop
A pre-edit hook that pauses a matching edit once, an MCP server for "is this error a known bug?", and a pre-commit check. All offline after the scan.
npx landmines check --stagedthe hook alone wasn't a significant win
One command for every agent in the repo.
install finds the agents configured in your project and writes each one its own hook or plugin, in its own deny format.
Pre-edit hook 15
Pauses a matching edit once, then lets the retry through.
- Claude Codelive
- Codex CLIlive
- Cursor
- Gemini CLI
- GitHub Copilot
- Windsurf / Devin
- Antigravity
- Factory Droid
- Augment
- Kiro
- Qwen Code
- Crush
- Goose
- OpenHands
- Trae
In-process plugin 5
Runs inside the agent and rejects the tool call.
- OpenCode
- Kilo Code
- Cline
- Amp
- Pi
Rules + MCP any
For agents without a pre-edit hook: the rules section, an Agent Skill and the MCP server.
- Freebuff
- Aider
- Zed
- Roo Code
- Continue
- Warp
live run end to end against the real agent. The rest are built from each agent's documentation and tested against its payload shapes. What install writes for each.
What the numbers don't say.
It's our benchmark
No public benchmark measured this, so we built landmine-bench. Splits were frozen before tuning, a confirmation run was written down before it ran, and every result file is public.
Selection
Every trap is a bug landmine had already indexed. The benchmark shows it helps once a bug is in the index, not how many bugs it finds. Only open issues that name your exact version are found.
Prompt wording
With fully specified prompts the agent already avoids most traps (19/21 unaided, 21/21 with landmine). The gap shows up when the request reads like a real one.
The hook alone
The pre-edit hook didn't measurably beat no help. Telling the agent up front did, which is why --rules comes first.
Check your lockfile before your agent does.
Also npm i -D landmines or brew install devanshranjan10/tap/landmines. Needs Node ≥ 22.12. Commit .landmine/index.json and your team's agents share it.