From 92ac4e5b871dbd6d9be197c4a078c4c493fe236e Mon Sep 17 00:00:00 2001 From: Roman | RyzenAdvanced Date: Tue, 26 May 2026 13:05:19 +0400 Subject: [PATCH] docs: update CHANGELOG + lib with all TRAE fixes (Claude guards, guardrail skip) --- CHANGELOG.md | 22 +++++++++++----------- src/codex_launcher_lib.py | 9 +++++---- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0056c63..06357ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,25 +2,25 @@ ## v3.10.12 (2026-05-26) -**Sticky Endpoint, Parallel Discovery, Smart Errors, Anti-Stall** +**Sticky Endpoint, Claude Fixes, Guardrail Skip, Anti-Stall** ### New Features -- **Sticky endpoint caching**: remembers which endpoint last succeeded, reuses it on every subsequent request (zero probe overhead) -- **Parallel endpoint discovery**: probes ALL endpoints simultaneously, first 200 wins and is cached -- **Automatic re-probe**: if the sticky endpoint fails (429/502/503), cache is cleared and all endpoints are probed in parallel again -- **Endpoint order swapped**: `daily-cloudcode-pa` tried first (matches agy-core behavior), `cloudcode-pa` as fallback +- **Sticky endpoint caching**: remembers which endpoint last succeeded, reuses it on every subsequent request (zero overhead) +- **Sequential fallback**: if sticky endpoint fails (429/502/503), tries next endpoint in order — no parallel probing, no wasted requests +- **Endpoint order**: `cloudcode-pa.googleapis.com` first (matches agy CLI), `daily-cloudcode-pa.googleapis.com` as fallback - **Anti-stall engine**: kills stale proxy processes and clears `__pycache__` on every new session start - **Smart error classification**: distinguishes `quota_exhausted` vs `capacity_exhausted` vs `account_banned` vs `validation_required` vs `service_disabled` vs `auth_permanent` - **Rate limit reset time parsing**: extracts cooldown from error body (`quotaResetDelay`, `Resets in ~1h27m`, etc.) for accurate cooldown - **Missing Antigravity headers**: `X-Client-Name`, `X-Client-Version`, `x-goog-api-client`, platform-aware `User-Agent` - **Session ID**: added `sessionId` to request wrapper for proper session tracking -### How It Works -1. First request: parallel probe → daily-cloudcode-pa and cloudcode-pa hit simultaneously → first 200 wins, cached -2. All subsequent requests: goes straight to cached endpoint (no probing) -3. If cached endpoint returns 429: cache cleared, parallel re-probe -4. If cached endpoint returns 400/403: error returned to client immediately -5. On startup: anti-stall kills all stale translate-proxy processes, clears pycache +### Bug Fixes (TRAE Agent) +- **Guardrail skip for simple messages**: when user sends simple messages (e.g. "hi"), skip injecting `_GEMINI_AGENT_GUARDRAIL` — prevents model from aggressively calling tools and looping `ls -la` 50+ times +- **Claude tool preservation**: Claude models through Antigravity now keep ALL tool outputs in normalizer (no summarization/truncation) — prevents context loss that broke Claude sessions +- **Claude compaction guard**: `_adaptive_compact` skipped for Claude models — Claude handles its own context, no forced compaction +- **Claude normalizer guard**: `_antigravity_normalize_context` skipped for Claude models — avoids stripping Claude-specific message structure +- **Claude sanitization guard**: Google content sanitization loop skipped for Claude models — prevents mangling Claude's response format +- **Normalizer model parameter**: `_antigravity_normalize_context` now receives `model` param to distinguish Claude vs Gemini behavior ## v3.10.11 (2026-05-26) diff --git a/src/codex_launcher_lib.py b/src/codex_launcher_lib.py index fc23cc7..2622e69 100644 --- a/src/codex_launcher_lib.py +++ b/src/codex_launcher_lib.py @@ -84,14 +84,15 @@ model_catalog_json = "" CHANGELOG = [ ("3.10.12", "2026-05-26", [ - "Sticky endpoint: caches last working endpoint, skips probing on subsequent requests", - "Parallel discovery: probes ALL endpoints simultaneously, first 200 wins", - "Auto re-probe: if sticky endpoint fails (429/502/503), parallel re-probe all", - "Endpoint order: daily-cloudcode-pa first (matches agy-core), cloudcode-pa fallback", + "Sticky endpoint: caches last working endpoint, sequential fallback on failure", + "Endpoint order: cloudcode-pa first (matches agy CLI), daily-cloudcode-pa fallback", "Anti-stall engine: kills stale proxy processes + clears pycache on startup", "Smart error classification: quota vs capacity vs banned vs validation vs auth", "Rate limit reset parsing: extracts cooldown from error body for accuracy", "Missing headers: X-Client-Name, X-Client-Version, x-goog-api-client, sessionId", + "Guardrail skip: simple messages (hi) skip agent guardrail, no more tool-call loops", + "Claude fixes: preserve all tools, skip compaction/normalizer/sanitization for Claude", + "Normalizer model param: distinguishes Claude vs Gemini for correct behavior", ]), ("3.10.11", "2026-05-26", [ "Hybrid endpoint fallback: cloudcode-pa then daily-cloudcode-pa on 429",