This release includes breaking changes for platform teams planning a safe upgrade.
✓ No known CVEs patched in this version
Topics
+7 more
Summary
AI summaryEliminates deadlock in enforce-route hook by adding a six‑point prevention system.
Full changelog
🔒 Stuck Pattern Prevention System
Version 5.6.0 eliminates the deadlock scenario where Claude gets trapped investigating routing enforcement. This release implements a comprehensive 6-point prevention system in the enforce-route hook.
What's Fixed
The Problem: In v5.5.1, when routing enforcement was triggered:
- Claude would attempt to investigate (read hooks, grep config)
- The enforce-route hook would block investigation tools
- No escape path existed → session deadlock
The Solution: 6-point prevention system prevents this entirely:
- Early file-op detection — Marks session as 'coding' on first Read/Glob/Grep/LS, allowing investigation without violations
- Violation counter — After 2 violations, auto-downgrades enforcement to soft mode (escape path)
- Auto-pivot mechanism — Automatically switches from hard to soft enforcement to prevent infinite loops
- Loop detection — Detects 3+ same-tool calls in 120s and warns explicitly
- State visibility — Enforcement messages show routing window countdown
- Mandatory escalation — Clear messaging (🔴 Violation 2+, ⏰ ROUTING WINDOW CLOSING)
Migration
pip install --upgrade claude-code-llm-router
llm-router install # Redeploy updated enforce-route hook
Technical Details
- Hook progression: v9 (baseline) → v10 (HIGH priority fixes) → v11 (MEDIUM) → v12 (LOW)
- No breaking changes; all existing routing behavior preserved
- Backwards compatible: existing
.envand config files work unchanged - All 940+ tests passing with new prevention system
- Zero false positives: investigation instinct is explicitly allowed
What's New
Enforce-Route Hook v12 includes:
_violation_counter_path()— Persistent violation tracking_detect_investigation_loop()— Pattern detection in tool history- Early file-operation detection (line ~310)
- Auto-pivot logic (line ~330)
- Enhanced error messages with escalation warnings
See CHANGELOG.md for detailed feature list.
This release makes llm-router production-safe. Nobody will get stuck. Multiple escape mechanisms ensure smooth recovery from any routing scenario.
Weekly OSS security release digest.
The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.
No spam, unsubscribe anytime.
Share this release
About ypollak2/llm-router
Subscription-aware LLM router for Claude Code. Routes tasks to 20+ providers (OpenAI, Gemini, Groq, Ollama, Codex) based on complexity classification, Claude subscription pressure, and cost. Free tasks stay on Claude subscription; expensive tasks fall back to the cheapest capable model. Includes 30 MCP tools, 6 auto-routing hooks, semantic dedup cache, prompt caching, daily spend cap, and a live web dashboard.
Related context
Related tools
Beta — feedback welcome: [email protected]