RLHF feedback loop for AI agents. Capture feedback, block mistakes, export DPO data.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Self-improving pre-action firewall for AI coding agents
AI coding agents repeat mistakes β and one wrong tool call can wipe a directory, leak a key, or push broken code.
ThumbGate is the local-first Pre-Action Checks engine for AI coding agents. It runs in the PreToolUse hook to evaluate the proposed tool call before execution β so costly mistakes can be caught before they happen.
Lightweight visuals for how agents fail without a pre-action gate:
| Meme | Meaning |
|---|---|
| Unchecked tool calls ship destructive commands. | |
| A prompt is advice; a PreToolUse hook is enforcement. |
It hard-blocks detected secret leaks and two direct self-disable command classes by default β commands that terminate the ThumbGate gate process or enable its bypass environment override. Other high-risk classes (rm -rf, force-push, fetch-and-run, direct guardrail edits) warn and log by default. Set THUMBGATE_STRICT_ENFORCEMENT=1 for strict enforcement (warnings become hard denies).
| Verdict | Default behavior |
|---|---|
| β Hard-block | Detected secret leaks; process-kill/environment-override self-disable |
| π Warn + log | rm -rf, git push --force, fetch-and-run, direct guardrail edits β warn by default |
| π Allow | Everything else |
Accepted feedback is stored as local lessons. Repeated concrete failures can become prevention rules that promote from warnings to blocking gates. The firewall improves from operations without retraining the model. Prompt evaluation (npx thumbgate eval) turns accepted feedback into reusable eval cases and local proof reports.
Honest disclaimer: ThumbGate does not update model weights. It intercepts tool calls at runtime. Local-first β no cloud required for the enforcement path.
Works with Claude Code, Cursor, Codex, Gemini CLI, Amp, Cline, OpenCode, and other MCP agents.
Agentic development is becoming a loop: Guide β Generate β Verify β Solve. ThumbGate is the pre-action gate / pre-action boundary between generated intent and executed action.
Later DROP attempts in the same scope surface the check:
Directories and clients that install ThumbGate as an MCP server must start stdio MCP, not the HTTP API:
npx -y thumbgate mcpnpm start for MCP β that launches the hosted HTTP API (src/api/server.js), not the agent-facing stdio server.βΆ 90-second demo Β· GIF walkthrough
| Agent | Command | Enforcement |
|---|---|---|
| Claude Code | npx thumbgate init --agent claude-code | π‘οΈ Hard β PreToolUse |
| Codex | npx thumbgate init --agent codex | π‘οΈ Hard β pre_tool_use |
| Gemini CLI | npx thumbgate init --agent gemini | π‘οΈ Hard β PreToolUse |
| ForgeCode | npx thumbgate init --agent forge | π‘οΈ Hard β pre_tool_use |
| Cursor | npx thumbgate init --agent cursor | π¬ Advisory β MCP gate_check |
| Cline | npx thumbgate init --agent cline | π¬ Advisory β MCP + .clinerules |
| OpenCode | npx thumbgate init --agent opencode | π¬ Advisory β MCP gate_check |
| Any MCP agent | npx thumbgate serve | π¬ Advisory β MCP gate_check |
| Amp | npx thumbgate init --agent amp | π Feedback capture |
Per-agent guides: Claude/Codex bridge Β· Codex profile Β· Cursor Β· MCP setup
| Scope | Command | Settings | Lessons | Best for |
|---|---|---|---|---|
| Machine-wide (default) | npx thumbgate init | ~/.claude/settings.json | ~/.claude/memory/feedback/ | Solo operators β same machine-local feedback store across repos |
| Per-project | npx thumbgate init --project | <repo>/.claude/settings.json | <repo>/.claude/memory/feedback/ | Client / compliance β separate dashboard / isolated lessons per repo |
Both scopes write mcpServers.thumbgate plus PreToolUse / UserPromptSubmit / PostToolUse / SessionStart hooks. Machine-wide is the right default for most developers. Cross-repo blocking is not automatic: a lesson learned in one project only applies elsewhere when you share the store (machine-wide) or export/import lessons.
MCP tools (surface): gate_check (read/evaluate proposed tool call), feedback capture + session tools (write), dashboard/stats (read). Destructive agent actions stay blocked/warned by PreToolUse β ThumbGate does not execute user shell commands for you.
Spec-driven agent frameworks like GSD (get-shit-done) and GitHub Spec Kit plan and generate work. ThumbGate is the guardrail layer for spec-driven agents: it sits after the plan, on the boundary between a generated tool call and its execution β alongside GSD / Spec-Kit, not instead of them.
npx thumbgate init installs these into your agent palette:
| Command | What it does |
|---|---|
/thumbgate-dashboard | Open local project dashboard |
/thumbgate-guard | Turn last mistake into a hard prevention rule |
/thumbgate-rules | List active rules & lessons |
/thumbgate-blocked | Gate stats + enforcement matrix |
/thumbgate-protect | Branch governance + scoped approval |
/thumbgate-doctor | Health-check hooks, MCP, readiness |
Free tier: 2 feedback captures/day (10 total) and up to 3 active auto-promoted prevention rules. Pro ($19/mo or $149/yr) is the individual tier for unlimited rules, history-aware lessons, linked feedback session flow, personal dashboard, and DPO export. Enterprise is custom and scoped after intake; hosted team lesson sync and a hosted org dashboard are not general availability.
| Free | Pro ($19/mo or $149/yr) | Enterprise | |
|---|---|---|---|
| Local CLI + PreToolUse | β | β | Scoped after intake |
| Feedback captures | 2 feedback captures/day (10 total) | Unlimited | Scoped after intake |
| Active auto-promoted rules | up to 3 active auto-promoted prevention rules | Unlimited | Scoped after intake |
| Personal dashboard + DPO export | β | β | Reviewed during intake |
| Hosted team lesson sync | β | β | Not general availability |
| Hosted org dashboard | β | β | Not general availability |
Enterprise intake path: the Workflow Hardening Sprint scopes one repeated failure before any broader rollout commitment. Start intake β
Local technical path: install the CLI and use init plus the documented setup so Pre-Action Checks evaluate tool calls where the agent actually runs.
First-dollar activation path: open the ThumbGate GPT, paste the risky action, capture typed feedback (thumbs down: / thumbs up:). Native ChatGPT rating buttons are not the ThumbGate capture path. Ask: what repeated AI mistake would be worth catching before the tool executes?
Paid path for individual operators: ThumbGate Pro is the self-serve side lane for a personal dashboard and export-ready evidence.
Start free Β· Pro $19/mo Β· Live Dashboard Β· Team Sprint intake Β· Workflow Hardening Sprint Β· First Dollar Playbook
Popular buyer questions: AI search topical presence Β· Relational knowledge and AI recommendations Β· AI Mode ads for agent governance Β· MCP tool governance Β· AI agent pre-action approval gates Β· Background agent governance Β· GPT-5.5 model evaluation Β· Stop repeated AI agent mistakes Β· Browser automation safety Β· Native messaging host security Β· Autoresearch agent safety Β· Cursor guardrails Β· Codex CLI guardrails Β· Gemini CLI memory + enforcement Β· Google Cloud MCP guardrails Β· Roo Code alternative: migrate to Cline
open_feedback_session, or ThumbGate GPT)Pro operators can invoke search_lessons through MCP and use npx thumbgate lessons from the CLI. History-aware feedback sessions and lesson search are Pro capabilities; Free does not include recall or search.
| Layer | Tech |
|---|---|
| Runtime | Node.js β₯18 |
| Interfaces | MCP stdio, HTTP API, CLI |
| Storage | SQLite + FTS5, LanceDB vectors, JSONL logs |
| Intelligence | MemAlign dual recall, Thompson Sampling, local embeddings |
| Billing / host | Stripe, Railway |
| Execution | Railway, Cloudflare Workers, Docker Sandboxes |
| Governance | Workflow Sentinel, control plane, Docker Sandboxes |
Every Changeset is tied to the exact main merge commit and generates Verification Evidence for Release Confidence.
| Surface | Start here |
|---|---|
| Open ThumbGate GPT | thumbgate.ai/go/gpt β ThumbGate GPT: start here. Paste agent actions, get advice + checkpointing. No, users do not have to keep chatting inside the ThumbGate GPT to use ThumbGate β the hard enforcement layer still runs where the work happens. |
| Install Codex Plugin | Open the Codex plugin install page: thumbgate.ai/codex-plugin Β· zip: thumbgate-codex-plugin.zip Β· plugins/codex-profile/INSTALL.md |
Claude Desktop .mcpb | latest release |
| VS Code / Open VSX | plugins/vscode-extension/README.md |
| Antigravity-compatible | plugins/antigravity-extension/INSTALL.md |
| JetBrains | plugins/jetbrains-plugin/README.md Β· JetBrains Marketplace path for the same runtime |
| ChatGPT App / GPT Action | thumbgate.ai/chatgpt-app |
| ThumbGate-Core (staging) | https://github.com/IgorGanapolsky/ThumbGate-Core β pre-release staging + a few internal cache scripts; not the product moat |
Full index: docs/INDEX.md
| Need | Link |
|---|---|
| Agent workflow contract | WORKFLOW.md |
| Ready-for-agent intake | .github/ISSUE_TEMPLATE/ready-for-agent.yml |
| Verification Evidence | docs/VERIFICATION_EVIDENCE.md |
| Release Confidence | docs/RELEASE_CONFIDENCE.md |
| Changeset strategy | docs/CHANGESET_STRATEGY.md |
| First Dollar Playbook | docs/FIRST_DOLLAR_PLAYBOOK.md |
| Security policy | SECURITY.md |
| Threat model | THREAT_MODEL.md |
| Federal / regulated | docs/FEDERAL.md |
| Commercial Truth | docs/COMMERCIAL_TRUTH.md |
| Issues / PRs | GitHub Issues Β· PR template |
FAQ (one-liners): Not a fine-tuner (runtime intercept only). Different from CLAUDE.md / .cursorrules (those are context; ThumbGate is an external allow/warn/deny before tools run).
Igor Ganapolsky β payments (Stripe/Connect), AI agent guardrails/MCP, Android + backends. Small number of contract slots: $120β150/hr, 1099, remote US. LinkedIn Β· thumbgate.ai
MIT β see LICENSE. Project policy: SECURITY.md Β· THREAT_MODEL.md.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/rlhf-feedback-loop)<a href="https://allmcps.com/mcp/rlhf-feedback-loop"><img src="https://allmcps.com/api/badge/rlhf-feedback-loop?style=directory" alt="Rlhf Feedback Loop on AllMCPs" /></a>