Files
gstack/browse
Garry Tan c98ef05c03 fix(sidebar-agent): evict tool-use registry entries on tool_result
toolUseRegistry was append-only. Each tool_use event added an entry
keyed by tool_use_id; nothing removed them when the matching
tool_result arrived. Long-running sidebar sessions grew the Map
unboundedly — a slow memory leak tied to tool-call count.

Delete the entry when we handle its tool_result. One-line fix.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 07:17:31 +08:00
..