Claude got stuck in a loop.
ContextGuard stopped it.
Catches loop patterns and bloated output mid-session. Surfaces the root cause and offers safe intervention.
Runs 100% locally. Code and transcripts never leave your machine without action.
Free, no signup required
Claude action → npm test • same failure • attempt 1
Analyzing action sequence
Monitoring action sequence
Four Tiers of Session Defense
Autonomous modules intercept infinite loops, context bloat, and rule degradation in real time.
Halting No-Progress Repetition
Input Signal
Live telemetry from Claude Code and workspace state:
- →Bash / Edit / Read tool execution sequence
- →Error signature hash & non-zero exit code
- →Workspace git diff between iterations (delta = 0)
Cognitive Decision
Local semantic loop analyzer:
- ◆3rd identical attempt detection without code edits
- ◆Session progress evaluation: 0.00% over last 4 minutes
- ◆Circuit Breaker engagement with precise problem diagnosis
Guaranteed Outcome
Context preserved with clean recovery path:
- ✓Up to 45K tokens saved on intercepted incident
- ✓Precise diagnostic report explaining why Claude is looping
- ✓Force Rethink prompt injected to redirect strategy
Attempt 1: npm test (failing on line 42)
Attempt 2: npm test (zero code edits, repeat failure)
Attempt 3: Loop Guard intercepted execution
Complete Control Over Claude Code Cost & Logic
From deep cache and token cost telemetry to live loop interruption and invariant rule retention.
Cost & Prompt Caching Telemetry
Real-time visibility into token input/output, cache write efficiency, and dynamic session cost.
Sub-penny precision accounting calibrated to official Anthropic model pricing.
Granular accounting of context payload vs generated code stream.
Continuous tracking of the 5-minute Prompt Caching window saving up to 90% cost.
Maintaining 96%+ cache reuse to maximize 5-hour quota availability.
Interactive Terminal: Loop Interception & Recovery
Step-by-step reproduction of a real Claude Code session: repeating errors, circuit breaker engagement, evidence telemetry, and stabilization.
Instant .jsonl Session Audit
Drop a Claude Code session file or test the sample transcript to see real costs, loops, and cache efficiency.
Transcripts are parsed purely in JavaScript inside your browser. Zero server uploads.
Choose Your Level of Protection
The CLI is free forever for offline inspection. Pro adds active real-time runtime defense. Unconditional 14-day money-back guarantee.
Free Community
Local transcript audit, historical loop inspection, and config linting.
- ✓Local CLI audit of .jsonl session files
- ✓CLAUDE.md & MCP configuration cleanup
- ✓Cost estimation calibrated to Anthropic rates
- ✓100% offline processing on your local disk
- ✕No active real-time loop interception
- ✕No Continuity Guard (rules after /compact)
- ✕No Output Guard (test log distillation)
Pro Monthly
Active real-time protection for developers building with Claude Code daily.
- ✓Live Loop Interceptor: stops no-progress loops (< 2ms)
- ✓Output Guard: compresses test dumps & noise by 84.2%
- ✓Continuity Guard: 100% rule retention across /compact
- ✓5-Hour Quota Radar & Velocity Alerts
- ✓Lossless Vault: local offline archive without token burn
- ✓14-day unconditional money-back guarantee
Pro Lifetime
Lifetime access to all Pro capabilities and future updates with zero recurring fees.
- ★All Pro capabilities included forever
- ★No monthly subscriptions or recurring fees
- ★Priority access to new modules & beta updates
- ★Direct founder priority technical support
- ★Transferable license key
Team & Organization
Centralized quota visibility, team rule synchronization, and organization budget safety.
- ✓All Pro features for every team developer
- ✓Central team dashboard with cache reuse metrics
- ✓Security rule & policy synchronization
- ✓Centralized billing and invoice management
- ✓Dedicated onboarding manager & SLA
●What are you paying for?
ContextGuard pays for itself within 2–3 days of active engineering by preventing sudden 5-hour limit burnouts mid-task and saving $40 to $60/month in unnecessary API token waste.
Payment Methods
Security Guarantee: Transactions processed via certified gateways (Stripe, CoinGate). No card numbers stored.
- ✓Credit & Debit Cards (Visa, Mastercard, Mir)
- ✓Cryptocurrency (USDT TRC20, USDC Polygon, BTC, ETH, TON)
- ✓Fast Payment System (SBP)
PayPal & Apple Pay (Integration updating)
Transparent Privacy Architecture
Your code and prompts never leave your local machine. Cloud telemetry is strictly opt-in and restricted to high-level numeric metrics.
Local Runtime (CLI, Plugin, Web Audit)
All parsing, transcript analysis, CLAUDE.md linting, and loop interception happen strictly on your computer.
- ✓Source code, git diffs, and repository files
- ✓User prompts and Claude model output text
- ✓CLAUDE.md contents, .env files, and secret tokens
- ✓Raw session transcripts (~/.claude/projects/)
- ✓Local hook telemetry vault (~/.contextguard/vault/)
Cloud Dashboard (Team Analytics)
Sent only when explicitly running npx contextguard audit --push or signing into the dashboard.
- ↗Aggregated token counts (Input / Output / Cache)
- ↗Estimated session cost in USD and cache hit rate
- ↗Anonymous hostname label for team aggregation
- ↗Account email and Pro license status
What ContextGuard Never Does
- ✕Never reads or uploads source code to the cloud
- ✕Never intercepts your Anthropic or OpenAI API keys
- ✕Never transmits telemetry without an explicit --push flag
- ✕Never sells or shares user data with third parties
Data Processing & Isolation Diagram
Clear visual separation of the local perimeter and optional cloud layer
Хуки ContextGuard подключаются локально через Node.js middleware. Анализ токенов и детекция зацикливаний выполняются за < 2мс без сетевых сокетов.
Frequently Asked Questions
Everything you need to know about privacy, pricing, compatibility, and real-time runtime defense in ContextGuard.
01Where are my prompts, source code, and repository files sent?↓
Nowhere, ever. ContextGuard operates under a strict 100% Local-First principle. All parsing, .jsonl transcript auditing, loop interception, and config linting run entirely in your local memory. Not a single line of code or prompt is transmitted over the network. The cloud dashboard is strictly opt-in via --push and only receives anonymous token integers.
02Do I need a separate Claude paid subscription or an Anthropic API key?↓
ContextGuard works alongside the official Claude Code CLI under any authentication mode: whether you use a Claude Pro / Max web subscription or a direct Anthropic API key. ContextGuard does not require its own API key and does not alter your billing relationship with Anthropic.
03How does ContextGuard calculate dollar cost estimations?↓
Costs are calculated using official published Anthropic API pricing for active models (Claude 3.7 Sonnet, Claude 3 Opus, Claude 3.5 Haiku). It accurately tracks Input ($3/MTok), Output ($15/MTok), Cache Write ($3.75/MTok), and the 90% discount on Cache Read ($0.30/MTok).
04Does runtime inspection slow down Claude Code command execution?↓
No. ContextGuard hooks are implemented as ultralight Node.js middleware executing in < 2 milliseconds. In fact, by compressing massive test failure dumps via Output Guard, ContextGuard actively speeds up Claude's generation latency.
05Which operating systems and terminal environments are supported?↓
ContextGuard is cross-platform and natively supports macOS (Apple Silicon M-series & Intel), Linux (Ubuntu, Debian, Fedora, Arch), and Windows (PowerShell, WSL2, CMD). It only requires Node.js 18+.
06How accurate are the token metrics and loop detection algorithms?↓
Token counts are 100% accurate because the CLI and web inspector parse official system transcripts generated directly by Anthropic's backend. The loop detector inspects exit-code sequences and git diff deltas to prevent false positives.
07How does subscription cancellation work and is there a refund guarantee?↓
You can cancel your monthly subscription with a single click from the dashboard at any time with no questions asked. All Pro tiers (including Lifetime) come with an unconditional 14-day full refund guarantee: just email support@contextguard.dev for an immediate refund.
08What is included with the Pro Lifetime license?↓
Pro Lifetime is a one-time $79 investment instead of recurring fees. You receive permanent Pro access to all current and future ContextGuard modules, a transferable license key, beta channel access, and direct technical support from the founders.