Skip to content

v1.3.1 — 550k context window, auxiliary fast-path, and multi-tenant loop guard

Choose a tag to compare

@testAccountDeltas testAccountDeltas released this 13 Oct 18:21
· 2 commits to main since this release

Why this release

Real-world usage under heavy multi-step planning and deep code-base exploration demonstrated two operational bottlenecks:

  1. The historical 300k auto-compact threshold artificially severed active working chains mid-investigation, causing lossy context summarization and forced re-reading of source files.
  2. Background auxiliary calls generated by Claude Code (request-class=auxiliary for branch titles and summaries) inherited the global effort=xhigh setting, 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_WINDOW from 300k to 550,000 tokens (with CLAUDE_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 *-low tier with explicit (2048) budget (aux:low).
    • Completely eliminates 18–25s Borg reasoning pauses on background metadata queries, reducing latency to ~1.0–1.5s.

Multi-Tenant Loop Guard

  • Isolated Tracking: Streak counters for silent Read loops (LOOP_STREAK_THRESHOLD = 10) and exact tool-call repetitions (_toolcall_hists) are now keyed by agent_key ("main", "sub:<agent-type>").
  • Parallel subagents (e.g., 4 concurrent general-purpose workers) 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-8 to gemini-3.8-flash-tiered in MODEL_MAP.
  • Claude Desktop /effort slider now dynamically controls native ModeAuto (xhigh/max), *-high, *-medium, and *-low.
  • Updated claude-desktop-import.json generator.

Upstream Cluster Switch Telemetry

  • Logs now emit CACHE_MISS(cold_prefill) whenever in_tok >= 50000 with cold cache (cache_read < 50k), providing immediate visibility into upstream TPU worker reallocations.

Upgrading

python setup-agent.py

Safe to re-run on an existing install. Existing sessions can immediately take advantage of the 550k window via launch.cmd.