Skip to content

v1.3.92

Choose a tag to compare

@topcheer topcheer released this 29 Jun 16:59
· 6035 commits to main since this release

ggcode v1.3.92

Highlights

  • Autopilot Goal-directed execution — autopilot mode now collects a Goal from the user at the start of each session, anchors all work to that Goal, and checks progress until the LLM declares GOAL_COMPLETE. Works across TUI, Desktop, and daemon (IM/mobile) surfaces.
  • Tighter autopilot scope control — continuation heuristics reworked to prevent scope drift: passive inspection verbs no longer trigger false continuation, and the system prompt explicitly anchors work to the original task.
  • Critical concurrency fixes — 7 concurrency issues fixed across WebSocket, ChatBridge, tunnel broker, lanchat hub, and daemon bridge (5 Critical/High).
  • Desktop agent busy/idle state fix — all 4 agent run entry points now correctly emit run_done and call SetAgentBusy(false), preventing stuck "busy" state after LAN Chat messages, multimodal sends, and cancellations.
  • TUI resize fix + larger desktop fonts — conversation panel now syncs on terminal resize; desktop chat fonts use CSS variables for better readability on high-DPI displays.

Fixes and improvements

Autopilot

  • Goal lifecycle: on entering autopilot mode, the first agent run injects a meta-instruction asking the LLM to propose a goal and confirm it via ask_user. Once confirmed, the goal text is included in all continuation prompts as an anchor. When the LLM declares GOAL_COMPLETE, the goal is cleared and the loop stops. Switching away from autopilot mode clears any active goal.
  • Scope anchoring: system prompt restructured into three sections — scope ("stay on task"), continuation ("keep going autonomously"), and escalation ("when to call ask_user"). Continuation prompts shortened and focused.
  • Tighter heuristics: looksLikeProgressUpdate no longer matches passive inspection verbs ("I checked", "I inspected", "I found") that caused false continuation on completed work. Kept action verbs ("I fixed", "I updated", etc.). looksLikeMoreWorkRemaining removed overly broad markers ("todo", "hotspot", "identified").
  • Goal is in-memory only: not persisted across sessions. Mode-change detection works via two paths — agent.SetPermissionPolicy() (Desktop/Daemon) and clearGoalIfNotAutopilot() in RunStreamWithContent (TUI's in-place policy mutation).

Concurrency fixes

  • C1 (Critical): WebSocket send-on-closed-channel panic — unsubscribe before closing writeCh during shutdown.
  • C3 (Critical): OnStreamEvent called under ChatBridge.mu.Lock — moved emit to after Unlock().
  • C4 (Critical): cachedSessionInfo data race in tunnel Broker — all reads/writes now under sessionMu.
  • C5 (Critical): sendReceipt reads nicknames without lock — added RLock for nick reads in lanchat hub.
  • H1 (High): DaemonBridge TOCTOU between tryQueueInterruption and beginRunSlot — new atomic tryQueueOrBeginRun() method.
  • H2 (High): followSink interface data race — captured as local variable at function entry.
  • H5 (High): wsSend used RLock for WebSocket writes — changed to Lock (gorilla/websocket forbids concurrent writes).

Desktop GUI

  • Agent busy/idle fix: extracted unified finishRun(err) helper that saves session, flushes tunnel, calls SetAgentBusy(false), and emits run_done. Applied to all 4 agent run paths (sendMessageData, SendHiddenText, SendContent, Cancel). Previously, LAN Chat agent messages, multimodal sends, and cancellations left the UI stuck in "busy".
  • Larger fonts: chat message font sizes now use CSS variables (--font-size-base: 15px, --font-size-small: 13px) instead of hardcoded 12/13px values.

TUI

  • Resize sync: handleResize() now calls syncConversationViewport() so the conversation panel updates its dimensions after terminal resize (including Cmd+/- font zoom).

Upgrade notes

  • No breaking changes. All fixes are backward-compatible.
  • The autopilot Goal mechanism activates only when the user explicitly enters autopilot mode. No behavior change in other modes.

Compare