Repository navigation
v1.3.1 — 550k context window, auxiliary fast-path, and multi-tenant loop guard
Why this release
Real-world usage under heavy multi-step planning and deep code-base exploration demonstrated two operational bottlenecks:
- The historical 300k auto-compact threshold artificially severed active working chains mid-investigation, causing lossy context summarization and forced re-reading of source files.
- Background auxiliary calls generated by Claude Code (
request-class=auxiliaryfor branch titles and summaries) inherited the globaleffort=xhighsetting, triggering 20s+ deep hidden reasoning bursts on trivial 40-character responses.
This release raises the context compaction ceiling to 550k tokens based on reverse-engineered agy.EXE checkpoint heuristics, adds an automatic fast-path for auxiliary calls, isolates loop guards per subagent, and enables transparent reconnect retries.
550k Context Compaction Ceiling
- Expanded Work Window: Increased
CLAUDE_CODE_AUTO_COMPACT_WINDOWfrom 300k to 550,000 tokens (withCLAUDE_CODE_MAX_CONTEXT_TOKENS=1000000). - Validated Performance: Measured live across a 793-turn session reaching 352k+ tokens with 99.3% cache hit rates and sub-10s TTFT (8.5–9.7s). Demonstrates that transformer attention latency issues were previously driven by retrospective cache invalidation rather than context depth.
- Eliminates premature lossy compression and preserves ongoing test and exploration history across complex multi-file tasks.
Fast-Path for Auxiliary Requests
- Automatic header-aware routing (
x-claude-code-request-class: auxiliary):- Model forced to
*-lowtier with explicit(2048)budget (aux:low). - Completely eliminates 18–25s Borg reasoning pauses on background metadata queries, reducing latency to ~1.0–1.5s.
- Model forced to
Multi-Tenant Loop Guard
- Isolated Tracking: Streak counters for silent
Readloops (LOOP_STREAK_THRESHOLD = 10) and exact tool-call repetitions (_toolcall_hists) are now keyed byagent_key("main","sub:<agent-type>"). - Parallel subagents (e.g., 4 concurrent
general-purposeworkers) maintain independent streak states without false-positive crosstalk. - When an individual subagent enters an unproductive slice-reading pattern, it receives a targeted synthetic stop-nudge to course-correct without disturbing siblings.
Upstream Reconnect Retry on ConnectionResetError
- Transparent in-stream retry: if Google upstream drops the TCP connection (
ConnectionResetError 10054) before content chunks arrive (client received only SSE keepalive pings), the proxy automatically reopens upstream and continues generation within the same client connection.
Claude Desktop Adaptive Opus Integration
- Mapped
claude-opus-4-8togemini-3.8-flash-tieredinMODEL_MAP. - Claude Desktop
/effortslider now dynamically controls nativeModeAuto(xhigh/max),*-high,*-medium, and*-low. - Updated
claude-desktop-import.jsongenerator.
Upstream Cluster Switch Telemetry
- Logs now emit
CACHE_MISS(cold_prefill)wheneverin_tok >= 50000with cold cache (cache_read < 50k), providing immediate visibility into upstream TPU worker reallocations.
Upgrading
python setup-agent.pySafe to re-run on an existing install. Existing sessions can immediately take advantage of the 550k window via launch.cmd.