@kml
Passing tests while keeping AST traversal under 0.25 ms is impressive.
Regarding latency: in planning-guard, our in-memory status reads average ~0.22 ms round-trip, so your ~0.44 ms in AgentGate is right in line with expectations for synchronous stdio interception.
Memory Overhead in Multi-Turn Sessions: What We Actually Do
Our MCP server (planning-guard) avoids database engines entirely. Here is our actual setup:
1. In-Memory Map Cache + Local JSON File
In our server, we maintain an in-memory Map (workspaceCache = new Map()) that holds the active session state.
When state changes, we write it synchronously to a local JSON file partitioned by an SHA-256 hash of the workspace directory:
~/.gemini/antigravity/planning-guard/workspaces/workspace-<hash>.json
The state file is tiny (typically under 5 KB), and process RAM is essentially just the baseline Node.js runtime (~25 MB).
2. Compact Tool Responses
The real memory hazard in multi-turn sessions isn’t host RAM–it is the LLM context window.
If an MCP tool returns full state dumps, diffs, or execution histories on every turn, the conversation context balloons rapidly. In planning-guard, tools like planning_get_status default to a compact format (returning just ~300 characters showing the current stage and active step), keeping historical turn bloat to a minimum.
3. What We Observed with Gemini 4 Argon
In our own development sessions, we found this context discipline to be essential for model stability.
With Gemini 4 Argon having just launched to GA this week (13 October 2026), its deep reasoning capabilities mean it can spend several minutes in extended thinking on complex prompts before outputting tokens. In practice, when multi-turn sessions accumulate large tool outputs and context approaches 50k–80k+ tokens, this extended thinking frequently trips cloud proxy SSE streaming timeouts (EOF / interrupted stream) where proxies expect byte traffic within 60–120 seconds.
It is also worth noting an important boundary: while RFC-003 decoupled staging completely eliminates local MCP client stdio timeouts, it cannot prevent cloud-side proxy timeouts (EOF) if the conversation context is already bloated. Once Argon enters 2–4 minutes of deep reasoning on a heavy prompt, the cloud proxy drops the socket before any MCP tool is even evaluated. Compact MCP returns help delay context bloat, but they cannot cure upstream proxy timeouts until Google’s transport patches land.
This is primarily an infrastructure teething issue for the launch rollout. Google’s updated documentation recommends bumping client read timeouts to 15–20 minutes, and connection keep-alive patches for the desktop IDE and CLI are rolling out during this introductory launch window (which runs through 30 November 2026).
Until those transport-layer keep-alive updates fully land, keeping MCP tool returns lean and holding detailed logs on disk rather than in the chat history remains the most practical workbench mitigation to keep long multi-turn sessions rock-solid.
It is a simple flat-file approach, but it has kept our memory footprint flat across hundreds of turns without needing external services.
Addendum (Argon & RFC-003 Roadmap):
We are holding off on any RFC-003 protocol revisions until Google’s transport-layer keep-alives stabilise. In the meantime, we are actively testing session longevity workarounds locally and will share our findings here once the introductory rollout patches land.