The Technique — A Feedback-to-Enforcement Pipeline
ThumbGate is an open-source MCP server that tackles three core frustrations of daily Claude Code users: session amnesia, hallucinated completions, and repeated mistakes. It's not just another memory tool—it's an enforcement layer that learns from your corrections and prevents the same errors from happening again.
What It Does — Four Tools That Change Your Workflow
1. capture_feedback — Log Mistakes as They Happen
When Claude Code does something wrong—like force-pushing without asking or claiming tests pass when they don't—you capture it via an MCP tool call:
// Example from the ThumbGate interface
capture_feedback(
feedback: "down",
context: "Claude force-pushed without asking",
whatWentWrong: "Overwrote teammate's commits",
tags: ["git", "destructive"]
)
This creates a structured record that persists beyond your current session's context window.
2. prevention_rules — Auto-Generated Guardrails
After repeated failures on the same pattern, ThumbGate automatically generates rules like:
- Never force-push without explicit user confirmation
- Always run tests before claiming completion
- Check all 100+ occurrences when updating pricing strings, not just 3
These rules survive context window compaction and are injected into future Claude Code sessions when relevant.
3. satisfy_gate — Pre-Action Checkpoints
This kills the "hallucinated completion" pattern. Before Claude can claim "done," it must prove specific conditions are met:
Gate: "CI green on current commit"
Status: BLOCKED — last CI run failed
Action: Agent cannot claim "done" until gate passes
4. construct_context_pack — Smart History Retrieval
Instead of dumping your entire history into context, ThumbGate selects only what matters for the current task: relevant prevention rules, recent feedback, and task-specific decisions.
Why It Works — Statistical Enforcement, Not Just Memory
ThumbGate uses Thompson Sampling (a beta-binomial posterior model) to score feedback reliability. One-off complaints don't immediately become rules—only patterns that recur above a confidence threshold get promoted to prevention status.
The gate engine implements a default-deny model for high-risk actions. Claude Code must pass through checkpoint validation before executing anything flagged by prior failures.
How To Apply It — Setup in 2 Minutes
Quick Start
npx thumbgate serve
Permanent MCP Configuration
Add to your Claude Code MCP config file (~/.config/claude-code-desktop/mcp.json or equivalent):
{
"mcpServers": {
"thumbgate": {
"command": "npx",
"args": ["-y", "thumbgate", "serve"]
}
}
}
Once installed, ThumbGate's tools will appear in Claude Code's tool palette. Start by capturing feedback the next time Claude makes an error—the system will begin building your personalized rule set.
When To Use It — Specific Pain Points
- Git Operations: Prevent force-pushes, branch deletions, or other destructive actions without confirmation
- Test Validation: Stop Claude from claiming "all tests pass" without actually running them
- Pattern Errors: When Claude keeps making the same logical mistake (like missing edge cases in string replacements)
- Team Coordination: Maintain consistency across multiple developers using Claude Code on the same project
Pricing and Licensing
The core ThumbGate server is MIT licensed and completely free. A Pro tier ($19/month or $149/year) adds a dashboard with analytics, advanced rule visualization, and team management features.
What This Means for Your Claude Code Workflow
Instead of writing the same corrections in your CLAUDE.md file or repeating instructions session after session, ThumbGate automates the enforcement layer. It turns your reactive feedback into proactive prevention.
The key shift: you're no longer just telling Claude what to do—you're building a system that prevents it from doing the wrong thing. This is particularly valuable for teams where consistency matters, or for solo developers tired of fixing the same bugs multiple times.
Start with the free version today. Capture three instances of the same error, and watch as ThumbGate generates its first prevention rule. That's when you'll see the real power: Claude Code that learns from its mistakes.









