deadends.dev

Structured failure knowledge for AI agents — dead ends, workarounds, error chains

AI & MLPythonv0.3.2

deadends.dev

Errors Domains MCP Tools PyPI License

Structured failure knowledge for AI coding agents.

2000+ error entries across 51 domains. When AI coding agents encounter errors, they waste tokens on approaches that are known to fail. deadends.dev tells agents what NOT to try, what actually works, and what error comes next.

Website: deadends.dev · MCP Server: Smithery · PyPI: deadends-dev · API: /api/v1/index.json

Installation

bash
pip install deadends-dev

Requirements: Python 3.10+

MCP Server

The MCP server exposes 8 tools for AI coding agents:

ToolDescription
lookup_errorMatch an error message against 2000+ known patterns. Returns dead ends, workarounds, and error chains.
get_error_detailGet full details for a specific error by ID (e.g., python/modulenotfounderror/py311-linux).
list_error_domainsList all 50 error domains and their counts.
search_errorsFuzzy keyword search across all domains (e.g., "memory limit", "permission denied").
list_errors_by_domainList all errors in a specific domain, sorted by fix rate, name, or confidence.
batch_lookupLook up multiple error messages at once (max 10).
get_domain_statsGet quality metrics for a domain: avg fix rate, resolvability, confidence breakdown.
get_error_chainTraverse the error transition graph: what errors follow, precede, or get confused with this one.

Local (Claude Desktop / Cursor)

Add to ~/.claude/claude_desktop_config.json:

json
{
  "mcpServers": {
    "deadend": {
      "command": "python",
      "args": ["-m", "mcp.server"],
      "cwd": "/path/to/deadends.dev"
    }
  }
}

Hosted (Smithery — no local setup)

Install via Smithery:

bash
# Claude Code
npx -y @smithery/cli@latest install deadend/deadends-dev --client claude

# Cursor
npx -y @smithery/cli@latest install deadend/deadends-dev --client cursor

Or connect directly: https://server.smithery.ai/deadend/deadends-dev

Example Response

When an agent encounters ModuleNotFoundError: No module named 'torch', the lookup_error tool returns:

text
## ModuleNotFoundError: No module named 'X' (Python 3.11+)
Resolvable: true | Fix rate: 0.88

### Dead Ends (DO NOT TRY):
- pip install X with system Python (fails 70%): venv not activated

### Workarounds (TRY THESE):
- Create venv, activate, then pip install (works 95%)
- Use python -m pip install instead of bare pip (works 90%)

Quick Start — Python SDK

python
from generator.lookup import lookup, batch_lookup, search

# Single error lookup
result = lookup("ModuleNotFoundError: No module named 'torch'")

# What NOT to try (saves tokens and time)
for d in result["dead_ends"]:
    print(f"AVOID: {d['action']} — fails {int(d['fail_rate']*100)}%")

# What actually works
for w in result["workarounds"]:
    print(f"TRY: {w['action']} — works {int(w['success_rate']*100)}%")

# result["url"] is the canonical summary page URL (e.g. /python/modulenotfounderror/)
print(result["url"])

# Batch lookup (multiple errors at once)
results = batch_lookup([
    "ModuleNotFoundError: No module named 'torch'",
    "CUDA error: out of memory",
    "CrashLoopBackOff",
])

# Keyword search
hits = search("memory limit", domain="docker", limit=5)

Quick Start — CLI

bash
pip install deadends-dev
deadends "CUDA error: out of memory"
deadends --list  # show all known errors

API Endpoints

EndpointDescription
/api/v1/match.jsonLightweight regex matching (fits in context window)
/api/v1/index.jsonFull error index — includes page_url (canonical summary page)
/api/v1/{domain}/{slug}/{env}.jsonIndividual ErrorCanon (example)
/api/v1/openapi.jsonOpenAPI 3.1 spec with response examples
/api/v1/stats.jsonDataset quality metrics by domain
/api/v1/errors.ndjsonNDJSON streaming — includes page_url (canonical summary page)
/api/v1/version.jsonService metadata and endpoint directory
/llms.txtLLM-optimized error listing (llmstxt.org standard)
/llms-full.txtComplete database dump
/.well-known/ai-plugin.jsonAI plugin manifest
/.well-known/agent-card.jsonGoogle A2A agent card
/.well-known/security.txtSecurity contact (RFC 9116)

Covered Domains (51)

DomainErrorsExamples
Python88ModuleNotFoundError, TypeError, KeyError, MemoryError, RecursionError
Node70ERR_MODULE_NOT_FOUND, EACCES, EADDRINUSE, heap OOM, ERR_REQUIRE_ESM
Docker65no space left, exec format error, bind address in use, healthcheck
Kubernetes61CrashLoopBackOff, ImagePullBackOff, OOMKilled, RBAC forbidden, HPA
Git60failed to push, merge conflicts, detached HEAD, stash apply, tags
CUDA57OOM, device-side assert, NCCL, cuDNN, tensor device mismatch
Go54nil pointer, unused import, interface conversion, slice out of range
Java54NullPointerException, ClassNotFound, OutOfMemoryError, connection pool
Database52deadlock, connection pool, slow query, replication lag, constraint violation
AWS51AccessDenied, S3 NoSuchBucket, Lambda timeout, CloudFormation rollback
.NET50NullReferenceException, LINQ translation, DI circular, EF concurrency
ROS 250node spin, launch error, QoS mismatch, tf2 transform, action server
TypeScript49TS2307, TS2322, TS2345, TS2532, TS7053, TS2769, TS18048
Rust48E0382 borrow, E0308 mismatch, E0277 trait, E0106 lifetime, E0507
CI/CD47GitHub Actions timeout, secret not found, Docker rate limit, cache miss
PHP47headers already sent, too many connections, autoload, memory exhaustion
Terraform46state lock, cycle, provider not found, moved block, backend init
Networking44connection refused, ECONNRESET, SSL certificate, DNS timeout, EPIPE
Next.js44hydration failed, dynamic server, server-only import, RSC serialization
React44invalid hook call, too many re-renders, unique key, context, act()
pip41build wheel failed, conflicting deps, externally-managed, hash mismatch
Android40Gradle OOM, AAPT2, manifest merger, ProGuard, Jetifier
API40rate limiting, CORS, 413 payload, GraphQL N+1, pagination
Cloud40IAM denied, VPC peering, NAT gateway, auto-scaling, CDN cache
CMake40find_package, target link, CXX standard, toolchain, FetchContent
Communication40WebSocket close, MQTT disconnect, gRPC deadline, AMQP channel
Data40schema evolution, CDC lag, Spark shuffle, Parquet type mismatch
Elasticsearch40circuit breaker, mapping explosion, split brain, shard allocation
Embedded40stack overflow, HardFault, SPI/I2C error, watchdog reset, DMA
Flutter40setState disposed, RenderFlex overflow, Gradle build, platform channel
gRPC40UNAVAILABLE, DEADLINE_EXCEEDED, TLS handshake, message size
Hugging Face40model load OOM, tokenizer mismatch, PEFT, flash attention
Kafka40rebalance, offset commit, ISR shrink, schema registry, KRaft
LLM40prompt injection, token limit, hallucination, rate limit, embedding dimension
MongoDB40BSON size, write concern, oplog, aggregation memory, change stream
Nginx40upstream timeout, proxy_pass, SSL config, try_files, location order
OpenCV40assertion failed, codec error, channel mismatch, DNN inference
Policy40rate limit, quota exceeded, size limit, API version, billing
PyTorch40CUDA OOM, tensor device, DDP init, autocast, checkpoint load
Redis40CLUSTERDOWN, memory limit, persistence, ACL, pub/sub message loss
Security40CSP violation, XSS, SQL injection, SSRF, JWT none algorithm
TensorFlow40shape mismatch, GPU memory, SavedModel, mixed precision NaN
Unity40NullReference, shader compile, asset bundle, NavMesh, physics
Culture67cultural taboos, political sensitivity, etiquette violations, identity
Safety7grease fire, chemical mixing, CPR, choking, electrical shock, tourniquet
Medical3drug interactions, folk remedies, allergic reactions
Mental Health2suicide response protocol, depression toxic positivity
Food Safety2raw chicken washing, rice room temperature
Disaster2earthquake doorframe myth, tornado overpass myth
Legal2self-defense law variation, copyright fair use myth
Pet Safety2dog toxic foods, cat toxic plants

ErrorCanon Data Format

Each error is a JSON file with:

json
{
  "error": { "signature": "...", "regex": "...", "domain": "..." },
  "verdict": { "resolvable": "true|partial|false", "fix_success_rate": 0.88 },
  "dead_ends": [{ "action": "...", "why_fails": "...", "fail_rate": 0.75 }],
  "workarounds": [{ "action": "...", "success_rate": 0.92, "how": "..." }],
  "transition_graph": { "leads_to": [...], "preceded_by": [...] }
}

AI Coding Agent Integration — 18 Discovery Formats

Every page on deadends.dev includes machine-readable data in 18 formats:

FormatLocationPurpose
JSON API/api/v1/{id}.jsonRESTful error data per ErrorCanon
match.json/api/v1/match.jsonCompact regex-only file (load entire DB into context)
index.json/api/v1/index.jsonMaster error index with metadata; each entry has page_url pointing to the canonical summary page
stats.json/api/v1/stats.jsonDataset quality metrics per domain
errors.ndjson/api/v1/errors.ndjsonStreaming NDJSON for batch processing; each record has page_url for the canonical summary page
OpenAPI/api/v1/openapi.jsonFull API spec with response examples
JSON-LDEvery <head>Schema.org TechArticle + FAQPage
ai-summaryEvery page<pre id="ai-summary"> KEY=VALUE blocks
llms.txt/llms.txtllmstxt.org standard
llms-full.txt/llms-full.txtComplete database dump
ai-plugin.json/.well-known/OpenAI plugin manifest
agent-card.json/.well-known/Google A2A protocol
security.txt/.well-known/RFC 9116 security contact
robots.txt/robots.txt34 AI crawlers explicitly welcomed
CLAUDE.md/CLAUDE.mdClaude Code instructions
AGENTS.md/AGENTS.mdOpenAI Codex CLI instructions
.clinerules/.clinerulesCline AI instructions

Development

bash
pip install -e ".[dev]"

# Full pipeline (validate → generate → build → test)
python -m generator.pipeline

# Individual steps
python -m generator.bulk_generate     # Generate canons from seeds
python -m generator.build_site        # Build static site
python -m generator.validate          # Validate data + site
python -m pytest tests/ -v            # Run tests

Contributing

Add error definitions to generator/bulk_generate.py or create JSON files directly in data/canons/.

bash
python -m generator.validate --data-only  # Validate before submitting

Changelog

v0.7.0

  • Expanded to 2089 error entries across 51 domains (from 1028/20)
  • Added 23 new domains: Android, API, Cloud, CMake, Communication, Data, Elasticsearch, Embedded, Flutter, gRPC, Hugging Face, Kafka, LLM, MongoDB, Nginx, OpenCV, Policy, PyTorch, Redis, ROS 2, Security, TensorFlow, Unity
  • All domains now have 40+ error entries each
  • Fixed 73 regex patterns that didn't match their own signatures

v0.5.0

  • page_url field added to index.json, errors.ndjson, and all SDK/MCP responses — always points to the canonical summary page (/domain/slug/), distinct from the env-specific url field
  • Lookup SDK url return value now points to the canonical summary page instead of the env-specific page
  • MCP tools (match_error, get_error_detail) now return canonical summary URLs
  • SEO fixes: Atom feed, IndexNow submissions, JSON-LD TechArticle, and Open Graph tags all corrected to use canonical summary URLs
  • Error chain links in HTML templates corrected to point to summary pages rather than noindex env pages

v0.4.0

  • Initial public release with 1028 error entries across 20 domains

License

MIT (code) · CC BY 4.0 (data)

Learn More