v1.3.161
ggcode v1.3.161
Highlights
Project Memory lazy loading
- Project Memory files (
GGCODE.md,AGENTS.md,CLAUDE.md, etc.) are no longer loaded into the system prompt in full. Instead, only file names are injected as an index hint — the LLM loads full content viaread_filewhen relevant to the current task. - This keeps the system prompt small regardless of how large memory files grow, saving thousands of tokens per request on projects with extensive conventions.
- Unified all 5 injection paths (interactive TUI, pipe mode, ACP, desktop, TUI model update) to use the same
BuildProjectMemoryHinthelper. - Startup assets optimized: replaced
LoadAllwithLoadIndex— only reads file paths, not contents — eliminating unnecessary I/O during launch.
Tool description optimization (~6 KB system prompt reduction)
- Systematically reviewed and trimmed all 90+ tool descriptions in
internal/tool/. - Removed information duplicated in Parameters JSON schema (action enums, field descriptions, format details) and the system prompt (mode definitions, collaboration routing, plan mode tool lists).
- Compressed verbose phrasing while preserving all behavioral constraints, safety warnings, and tool selection guidance.
- Biggest savings:
lanchat_tool(1.3 KB),config_tool(800 B),im_tool(800 B),switch_mode(600 B), all 10 LSP tools (300 B from removing redundant "using a locally installed LSP server").
I/O parallelization for multi-file tools
multi_file_readandmulti_file_editnow read files concurrently (semaphore-limited to 5) instead of sequentially, significantly reducing latency for large batches.
Fixes and improvements
- OpenRouter attribution headers — requests to
openrouter.aiendpoints now includeHTTP-Referer,X-Title, andX-OpenRouter-Categoriesheaders for proper attribution and app ranking. - Test coverage — added unit tests for
BuildProjectMemoryHint(empty/single/multiple/dedup) andisOpenRouterEndpoint(host matching, lookalike domain rejection).
Upgrade notes
No breaking changes. No config migration needed.