it retrieves name of the tool to get user info (github mcp behind mcpproxy) but never calls it falling into thinking loop. Other models like Gemini Flash or Claude Sonnet do work just fine
The agent is attempting to execute mcp_MCPProxy_call_tool_read to invoke the upstream tool GitHub:get_me.
This proxy tool requires three specific arguments:
name (String): The target tool ID (e.g., “GitHub:get_me”)
args_json (String): Target tool arguments serialized as a JSON string.
The agent runtime consistently crashes during the Generation Phase when the intent object is populated with keys, regardless of the args_json value.
The Crash Pattern:
Trigger: Populating the intent object (e.g., intent: {"operation_type": "read"}).
Error: encountered an improper format stop reason
Behavior: The request is aborted by the system’s safety/parsing layer. It never reaches the MCPProxy. It does not appear in chat. It triggers an invisible retry loop.
EXPERIMENTAL EVIDENCE
A. POPULATED INTENT (CRASHES)
Attempting to send a valid intent, even with empty args:
→ RESULT: SUCCESSFUL GENERATION. The request successfully reaches the MCPProxy tool execution layer. The code executes and returns a standard validation error: intent.operation_type is required.
CONCLUSION
The issue is explicitly located in the parsing of the intent object within the tool call generation.
The system accepts an empty object {} for intent, but crashes when it contains keys (like operation_type).
This creates a deadlock since the tool logic requiresoperation_type to be present, but the generation layer crashes if it is present.
I encountered similar issue of “Improper Format Stop Reason“ in Antigravity with all Gemini models. I found switching to Claude would solve the issue.
The bug is triggered after certain customized MCP tool call (likely related to MCP json parser), then the whole session would get poisoned. Built-in MCP tools like task_boundary and multi_replace_file_content would trigger “Improper Format Stop Reason“ error, and the agent very often gets stuck in an infinite thinking loop.
This looks like a serious bug on Google’s side. Please help us look into this.