v1.3.186
v1.3.186
Overview
31 commits since v1.3.185. Major improvements in agent robustness, error handling, and performance.
Agent Intelligence & Safety (16 features)
- Session-level token budget — progressive warnings at 75%/90%/100% of context window, with actionable guidance to /compact or /clear
- Reasoning block compaction tier — preserves thinking blocks longer than tool results, compacts them only when budget pressure is high
- Semantic scope drift detection — warns when the agent drifts from the original task scope, preventing scope creep
- Consecutive edit failure recovery — after 3 consecutive edit failures, injects strategic recovery guidance (re-read file, use different anchor)
- Batch edit conflict detection — detects overlapping edits to the same file within a single
multi_edit_filecall - Stale-read detection — detects when files have been modified externally (mtime check) between read and edit
- Unread-file edit guard — warns when editing a file that hasn't been read in the current session
- Mid-run stale todo detection — flags todo items that have been pending for too long, suggesting completion or removal
- Post-write file integrity validation — validates file content growth, detects null bytes and content loss after writes
- Debug statement detection — catches debug print/log statements left in code across 11 file types
- Proactive Go import analysis — detects unused/missing imports at write time, not waiting for build failure
- Secret detection and redaction — scans tool outputs for API keys, tokens, and passwords (12 regex patterns)
- Leftover artifact detection — catches merge conflict markers and suspicious content growth ratios
- Empty search spiral detection — breaks the cycle of repeated empty-result searches
- Recurring build/test error fingerprinting — detects repeated identical build errors
- Per-tool latency baseline outlier detection — flags tools that are unusually slow vs their historical baseline
Tool & UX Improvements (6 features)
- Smart commit workflow — conventional commit analysis with scope cohesion scoring and size recommendations
- Schema-guided parameter validation — validates required parameters before tool execution, catches missing args early
- Schema-aware argument coercion — auto-coerces unknown tool name suggestions and type mismatches
- Deterministic command result caching — caches identical build/test commands to skip redundant execution
- Consecutive-line compression — compresses repetitive tool output (e.g., 100 identical log lines) for better readability
- code_execution whitelist expanded — from 16 to 35 read-only tools for batch analysis
Performance (3 improvements)
- Go AST parsing deduplication — reduced from 3x to 1x
parser.ParseFileper .go file write (saves 10-40ms per write) - BM25 index memory/CPU optimization — reduced index memory footprint and CPU overhead
- scanContent truncation — CPU-protective truncation for regex operations on large tool outputs
Error Handling & Reliability (4 fixes)
- Vendor-specific rate limit and quota error patterns — added support for Anthropic HTTP 529 (overloaded), Gemini
RESOURCE_EXHAUSTED, Kimiexceeded_current_quota_errorandengine_overloaded_error, OpenAIinsufficient_quota. These were previously misclassified, causing either no retry (transient errors) or wasteful 20x retry loops (permanent errors) - Swarm permanent error loop fix — teammate tasks that fail with permanent errors (quota/auth) are now marked as completed-with-error instead of reverting to pending, preventing infinite retry loops across teammates
- Content growth ratio off-by-one — trailing newline caused false positive in 5x growth detection
- Memory eviction — count-based cap with category-priority eviction, preventing unbounded memory growth
Metrics
- 31 commits since v1.3.185
- 64 files changed, +9289 lines
- All tests passing: Go unit tests, Desktop tests, 113 Vitest frontend tests