Describe the Bug
GLM 5.2 MAX is not handling tool calls correctly in Agent Mode.
When the model attempts to use tools such as grep, read, or other file-search actions, the calls are not executed. Instead, the raw tool call markup is printed directly in the chat, and the agent exits silently without completing the requested task.
Example of raw tool call markup shown in chat:
⦠I should use the explore agent or do this directly. Let me start by searching for relevant files.<tool_call>Grep<arg_key>glob</arg_key><arg_value>/*.{ts,tsx}</arg_value><arg_key>head_limit</arg_key><arg_value>50</arg_value><arg_key>output_mode</arg_key><arg_value>files_with_matches</arg_value><arg_key>pattern</arg_key><arg_value>delete.document|deleteDocument|removeDocument|trash</arg_value></tool_call><tool_call>Grep<arg_key>glob</arg_key><arg_value>/.{ts,tsx}</arg_value><arg_key>head_limit</arg_key><arg_value>50</arg_value><arg_key>output_mode</arg_key><arg_value>files_with_matches</arg_value><arg_key>pattern</arg_key><arg_value>analisi|analysis|analyses</arg_value></tool_call>
Additionally, reasoning text appears to be exposed as part of the assistant response, instead of being handled as internal reasoning.
Steps to Reproduce
Steps to Reproduce
- Open Agent Mode.
- Select GLM 5.2 MAX as the active model.
- Send any request that requires the agent to use tools.
- Wait for the response.
- The raw tool call markup is displayed in the chat, and the agent exits silently.
Expected Behavior
GLM 5.2 MAX should execute tool calls correctly in Agent Mode and complete the requested task without exposing raw tool call markup in the chat.
Operating System
Windows 10/11
Version Information
Version: 3.10.11 (user setup)
VS Code Extension API: 1.125.0
Commit: 4ef9fe3d055f8c4523179a090f14eb835bc3c940
Date: 2026-07-03T04:44:14.398Z
Layout: IDE
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.256
OS: Windows_NT x64 10.0.26200
For AI issues: which model did you use?
GLM 5.2 MAX
Does this stop you from using Cursor
No - Cursor works, but with this issue