v1.3.187
v1.3.187
Overview
48 commits since v1.3.186. Major improvements in subagent UX, system prompt performance, provider resilience, and TUI stability.
Subagent & Follow Panel Fixes (8 fixes)
- Preserve spaces in reasoning chunks — DeepSeek reasoning tokens were having spaces stripped between words (
every10sevenwhentheappisidle). Root cause:strings.TrimSpace()on every streaming chunk. Fixed: LLM output is now passed verbatim, never trimmed. - Never trim whitespace from LLM output — Extended fix to all text/reasoning paths: empty checks use
== ""instead ofstrings.TrimSpace(). - Reasoning event coalescing — extended text coalescing to
AgentEventReasoningso hundreds of tiny reasoning chunks don't overflow the event buffer. - Subagent retry display fix — use
Containsinstead ofHasPrefixfor retry detection, preventing false matches. - Text content preservation during eviction — when all-text events are evicted, dropped text is prepended to remaining events to prevent word boundary corruption.
- Text event coalescing tuning — increased event buffer and tuned merge interval for better streaming feel.
- Subagent system message naming — prefix system messages with agent name for clarity.
- Model display in named agent labels — show model name in
use_namedagenttool call labels and follow strip.
Performance (4 improvements)
- Background section collector — system prompt sections (modified files, package symbols, project overview, toolchain) are pre-computed in a background goroutine every 10s, eliminating synchronous I/O on every prompt rebuild. Applied to TUI, daemon, and desktop.
- modifiedFilesSection caching — eliminates per-submit latency by caching the section between collector ticks.
- Follow panel rebuild skipping — skip expensive list rebuild when event count and status haven't changed.
- Post-edit LSP diagnostics timeout reduction — faster file edit feedback.
Provider Reliability (2 features)
- Provider/Model failover — transparently switches to a backup LLM provider when the primary fails with permanent errors (quota/auth) or sustained transient errors. Configurable via
fallback:section inggcode.yaml. - Fail-fast on quota/auth errors —
isRetryablenow immediately returns false for quota and authentication errors, preventing wasteful 20x retry loops.
New Features (4)
- Smart file path suggestions — when
read_file/edit_filefails on a non-existent path, returns fuzzy-matched suggestions ("did you mean: path/to/correct_file?"), saving 1-3 agent iterations per incorrect guess. - Session trace export — new
/export-trace [session-id]command exports structured JSON execution traces (TTFT, tool latency, token usage, cache stats) for observability and offline analysis. - Cross-file LSP diagnostics —
SiblingDiagnosticsdetects errors in related files after edits. - Configurable completion notifications — cross-platform desktop notifications when the agent completes a task.
TUI Stability (3 fixes)
- os.Stderr fd-level redirect — pion/turn's "Fail to refresh permissions" error was corrupting the TUI by writing directly to stderr. Fixed:
os.Stderris now replaced with a pipe that routes all writes todebug.Log, catching bothlog.New(os.Stderr, ...)andfmt.Fprint(os.Stderr, ...). - Desktop stderr redirect — same fix applied to desktop main.go.
- Output style persistence —
/styleand Ctrl+O now persist the change to config.
Other Improvements (5)
- Auto-inject modified file names into system prompt — agent sees which files were recently modified without explicit reads.
- Adaptive reasoning effort allocation — adjusts reasoning depth per turn based on task complexity.
- Multi-language delimiter balance validation — post-edit integrity checks for bracket/paren matching across multiple languages.
- Workspace file protection guardrails — prevents accidental overwrites of critical files.
- Placeholder/stub code detection — write integrity checks detect incomplete implementations.
Metrics
- 48 commits since v1.3.186
- All tests passing: Go unit + integration tests
- Build: clean on all platforms (Linux/macOS/Windows, amd64/arm64)