v1.3.175
ggcode v1.3.175
Highlights
- Inline tool call detection: Models that write tool calls as plain text instead of using the
tool_useformat are now detected and nudged to use proper format. Includes O(n²) prevention and attempt limiting. - Daemon mode improvements: lanchat Hub integration,
--new-sessionflag, and automatic session loading for daemon mode. - Ghost peer prevention: lanchat now broadcasts leave on shutdown and makes Close/Stop idempotent to prevent double-close panics.
New Features
Inline Tool Call Detection (881f8456, 6a37b84e)
Some models (especially smaller or less capable ones) write tool calls as plain text in their response instead of using the proper tool_use format. This causes the agent loop to stall because no tool is actually executed.
The agent loop now detects this pattern (hasInlineToolCall) and injects a system nudge instructing the model to use proper tool calls. The nudge is limited to 2 attempts per turn to prevent infinite loops.
Daemon Mode Enhancements (14004b86, a7af5891, 4713672f)
- lanchat Hub in daemon: The daemon process now initializes a lanchat Hub, enabling LAN discovery and messaging while running headless.
--new-sessionflag: Forces creation of a new session instead of auto-loading the most recent one.- Session auto-load: Daemon mode automatically loads the most recent session on startup.
- Session lock fix: The auto-loaded session lock is now correctly passed to the
sessionLockvariable to prevent concurrent access.
Fixes
Whitespace-Only Content Filtering (e5b5d41c, 3270a2ac)
Models sometimes emit whitespace-only text blocks (e.g., leading newlines before real content). These are now:
- Dropped from assistant content before processing
- Skipped in the UI renderer to avoid blank chunks
Ghost Peer Prevention (39c73bba, c0c8b2cf)
- Leave broadcast: Hub.Close() now broadcasts a leave message via UDP multicast before shutting down, so peers detect offline immediately instead of waiting for the 90s heartbeat timeout.
- Idempotent shutdown: Both
Hub.Close()andUDPTransport.Stop()now usesync.Onceto prevent double-close panics on repeated shutdown calls.
Performance
hasInlineToolCallO(n²) fix (23de1163): The inline tool call scanner now only scans the first 4KB of text instead of the entire content, preventing O(n²) behavior on long responses.
Upgrade Notes
No breaking changes. All improvements are backward compatible.