Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
After updating OpenClaw from 2026.5.26 to 2026.5.27, an agent using an LM Studio model can still initiate tool calls, but any tool call that requires arguments arrives at the executor with an empty/missing argument object. Parameterless tool calls still work.
Rolling back to 2026.5.26 resolved the issue.
Updating to 2026.6.1 surfaced the issue again. This time I traced it to the source and applied a hot patch. The patch is included in my report and I've attached the complete module to this issue.
Steps to reproduce
- Set LMstudio as your provider. Load a tool-calling model (e.g., Gemma 4, Qwen3.5, GLM4.7 Flash)
- Pin the model to an agent.
- Ask the agent to read, write, or use exec to complete a simple task. Observe the failure.
- Ask the agent to perform a tool call which requires no params. Observe the sucess.
- Chat with the agent, observe that when no tool-calls are made it works perfect.
Expected behavior
The LM Studio-backed agent3 should be able to call tools with arguments, e.g. read with a path, or exec with a command, as it did on 2026.5.26.
Actual behavior
- The agent can call tools that do not require parameters, such as
session_status
- Tools requiring parameters fail—required arguments are missing by the time tool execution starts.
- The agent reports that attempts to pass paths or commands arrive at the tool executor as an empty object
{}.
Example agent-facing failure:
> I am unable to pass any arguments or parameters to tools like exec or read. Every attempt to provide a command or path is arriving at the tool executor as an empty object {}.
Things I tried
- Hot patch to 2026.6.1: Issue resolved.
- Enabled
agents.defaults.experimental.localModelLean: true: Issue persisted.
- Ran
openclaw infer model run against the same LM Studio model without tool calls: It worked.
- Verified a direct call to LM Studio / same model works: It worked.
- Model switching (within LM Studio): Issue persisted across all local models.
- Model switching (to openai): Issue is resolved!
/reset and /new on every model tested: Issue persisted across all local models
- Gateway restart, stop, and install: Issue persisted.
- Updated config with
openclaw config set agents.defaults.models '{"lmslmstudio/google/gemma-4-26b-a4b":{"params":{"extra_body":{"tool_choice":"required"}}}}' --strict-json --merge: Issue persisted.
- Restored a backup to reset to 2026.5.26—other rollback methods failed
- After updating to 2026.6.1, changed provider API mode from
openai-responses to openai-completions: Issue persisted.
Why this looks like a regression
- The agent could call tools with arguments on 2026.5.26.
- After updating to 2026.5.27, only parameterless calls worked, effectively rendering my agent clawless.
- After rolling back and then updating to 2026.6.1, the issue resurfaced.
openai-responses-shared-BVt5jM-F_ORIGINAL_202606042111.js
openai-responses-shared-BVt5jM-F.js
OpenClaw version
2026.5.27, OpenClaw 2026.6.1 (2e08f0f)
Operating system
macOS 26.4.1
Install method
npm global
Model
google/gemma-4-e2b
Provider / routing chain
openclaw -> LMStudio
Additional provider/model setup details
Config excerpt - 2026.5.27 version
"providers": {
"lmstudio": {
"baseUrl": "http://localhost:1234/v1",
"apiKey": "lmstudio",
"api": "openai-responses",
"timeoutSeconds": 1200,
"models": [
{
"id": "google/gemma-4-26b-a4b",
"name": "google/gemma-4-26b-a4b",
"reasoning": true,
"input": [
"text",
"image"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 80000,
"maxTokens": 4192,
"api": "openai-responses"
},
]
}
}
Logs, screenshots, and evidence
## Additional diagnostics I am providing
- Redacted `models.providers.lmstudio` config (see below)
- Exact LM Studio model key: `google/gemma-4-26b-a4b`
- Full redacted `openclaw status --all` (see below)
- Logs from a minimal repro prompt
- Successful test of lmstudio demonstrating tool-call functionality at provider layer
- The patch that got me back up and running.
- The module with the patch applied, and module before the patch was applied.
---
### `openclaw status (prior to rollback)`
🦞 OpenClaw 2026.5.27 (27ae826) — Finally, a use for that always-on Mac Mini under your desk.
│
17:15:14 [plugins] loading discord from /Users/__REDACTED__/.openclaw/npm/node_modules/@openclaw/discord/dist/setup-entry.js
17:15:15 [plugins] loaded 1 plugin(s) (1 attempted) in 720.4ms
17:15:17 [plugins] loading browser from /opt/homebrew/lib/node_modules/openclaw/dist/extensions/browser/index.js
17:15:17 [plugins] loading google from /opt/homebrew/lib/node_modules/openclaw/dist/extensions/google/index.js
17:15:18 [plugins] loading lmstudio from /opt/homebrew/lib/node_modules/openclaw/dist/extensions/lmstudio/index.js
17:15:18 [plugins] loading memory-core from /opt/homebrew/lib/node_modules/openclaw/dist/extensions/memory-core/index.js
17:15:18 [plugins] loading openai from /opt/homebrew/lib/node_modules/openclaw/dist/extensions/openai/index.js
17:15:18 [plugins] loading acpx from /Users/__REDACTED__/.openclaw/npm/node_modules/@openclaw/acpx/dist/index.js
17:15:18 [plugins] loading codex from /Users/__REDACTED__/.openclaw/npm/node_modules/@openclaw/codex/dist/index.js
17:15:19 [plugins] loading diffs from /Users/__REDACTED__/.openclaw/npm/node_modules/@openclaw/diffs/dist/index.js
17:15:20 [plugins] loading discord from /Users/__REDACTED__/.openclaw/npm/node_modules/@openclaw/discord/dist/index.js
17:15:21 [plugins] loading lobster from /Users/__REDACTED__/.openclaw/npm/node_modules/@openclaw/lobster/dist/index.js
17:15:21 [plugins] loading lossless-claw from /Users/__REDACTED__/.openclaw/npm/node_modules/@martian-engineering/lossless-claw/dist/index.js
17:15:23 [plugins] loaded 97 plugin(s) (11 attempted) in 6163.0ms
OpenClaw status --all
Overview
┌────────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Item │ Value │
├────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Version │ 2026.5.27 │
│ OS │ macos 26.4.1 (arm64) │
│ Node │ 22.22.2 │
│ Config │ ~/.openclaw/openclaw.json │
│ Dashboard │ http://127.0.0.1:__REDACTED__/__REDACTED__/ │
│ Tailscale exposure │ off │
│ Channel │ stable (config) │
│ Update │ pnpm · up to date · npm latest 2026.5.27 │
│ Gateway │ local · ws://127.0.0.1:__REDACTED__ (local loopback) · reachable 83ms · │
│ │ auth token · __REDACTED__.tail__REDACTED__.ts. · net (192.168.1.134) app 2026.5.27 macos 26.4.1 │
│ Security │ Run: openclaw security audit --deep │
│ Gateway self │ unknown │
│ Gateway service │ LaunchAgent installed · loaded · running (pid 43695, state active) │
│ Node service │ LaunchAgent installed · loaded · running (pid 877, state active) │
│ Agents │ 4 total · 1 bootstrapping · 2 active · 504 sessions │
│ Secrets │ none │
└────────────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Channels
┌──────────┬─────────┬────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Channel │ Enabled │ State │ Detail │
├──────────┼─────────┼────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Discord │ ON │ OK │ token config×3 (sha256:2fd0ba3d · len 72) · accounts 3/3 │
└──────────┴─────────┴────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Discord accounts
┌──────────┬──────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Account │ Status │ Notes │
├──────────┼──────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ default │ OK │ token:config · credential available in gateway runtime · allow:755445743401304286 │
│ agent2 │ OK │ token:config · credential available in gateway runtime · allow:755445743401304286 │
│ agent3 │ OK │ token:config · credential available in gateway runtime · allow:755445743401304286 │
└──────────┴──────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Agents
┌───────────────────────────────┬────────────────┬──────────┬──────────┬─────────────────────────────────────────────────────────────────┐
│ Agent │ Bootstrap file │ Sessions │ Active │ Store │
├───────────────────────────────┼────────────────┼──────────┼──────────┼─────────────────────────────────────────────────────────────────┤
│ main (main) │ ABSENT │ 369 │ just now │ ~/.openclaw/agents/main/sessions/sessions.json │
│ agent2 (agent2) │ ABSENT │ 56 │ 47m ago │ ~/.openclaw/agents/agent2/sessions/sessions.json │
│ agent3 (agent3) │ ABSENT │ 79 │ 3m ago │ ~/.openclaw/agents/agent3/sessions/sessions.json │
└───────────────────────────────┴────────────────┴──────────┴──────────┴─────────────────────────────────────────────────────────────────┘
Diagnosis (read-only)
Gateway connection details:
Gateway target: ws://127.0.0.1:__REDACTED__
Source: local loopback
Config: /Users/__REDACTED__/.openclaw/openclaw.json
Bind: loopback
✓ Config: /Users/__REDACTED__/.openclaw/openclaw.json
✓ Secret diagnostics (0)
✓ Restart sentinel: none
Gateway last log line:
17:15:17 [ws] ⇄ res ✓ health 1730ms conn=f2b0538b…48b4 id=cdc97a12…fb87
! Port __REDACTED__
Port __REDACTED__ is already in use.
- pid 43695 user: /opt/homebrew/opt/node@22/bin/node /opt/homebrew/lib/node_modules/openclaw/dist/index.js gateway --port __REDACTED__ (127.0.0.1:__REDACTED__)
- pid 43695 user: /opt/homebrew/opt/node@22/bin/node /opt/homebrew/lib/node_modules/openclaw/dist/index.js gateway --port __REDACTED__ ([::1]:__REDACTED__)
- Gateway already running locally. Stop it (openclaw gateway stop) or use a different port.
- Another process is listening on this port.
- Multiple listeners detected; ensure only one gateway/tunnel per port unless intentionally running isolated profiles.
! Tailscale exposure: off · daemon unknown
✓ Skills: 36 eligible · 0 missing · /Users/__REDACTED__/.openclaw/workspace
✓ Plugin compatibility (none)
✓ Agent activity: 2 active in 30m · 504 sessions
✓ Inbound delivery telemetry: received 29 · dispatch 28/27 · turns 22 · processed 49
latest delivery event: 2m ago
### Gateway logs
(tail, summarized, redacted): /Users/__REDACTED__/Library/Logs/openclaw
# stdout: /Users/__REDACTED__/Library/Logs/openclaw/gateway.log
17:15:14 [agent/embedded] embedded run tool start: runId=3c2a3c23-a367-486d-82be-0f01e80f52be tool=read toolCallId=call_1339242629660208|fc_sqldj5qqxyz9yfip5edqc
17:15:14 [agent/embedded] embedded run tool end: runId=3c2a3c23-a367-486d-82be-0f01e80f52be tool=read toolCallId=call_1339242629660208|fc_sqldj5qqxyz9yfip5edqc
17:15:14 [openai-transport] [responses] start provider=lmstudio api=openai-responses model=google/gemma-4-e4b baseUrl=http://localhost:1234/v1 timeoutMs=600000 apiKey=***s=include,input,max_output_tokens,model,prompt_cache_key,prompt_cache_retention,reasoning,store,stream,tools model=google/gemma-4-e4b stream=true inputItems=5 inputRoles=system,user inputTextChars=18621 tools=count=30 sample=agents_list,browser,cron,diffs,edit,exec,gateway,image,lcm_describe,lcm_expand,lcm_expand_query,lcm_grep reasoningEffort=medium reasoningSummary=auto textVerbosity=undefined serviceTier=undefined store=false promptCacheKey=present metadataKeys=none
17:15:14 [provider-transport-fetch] [model-fetch] start provider=lmstudio api=openai-responses model=google/gemma-4-e4b method=POST url=http://localhost:1234/v1/responses timeoutMs=600000 proxy=none policy=custom
17:15:14 [provider-transport-fetch] [model-fetch] response provider=lmstudio api=openai-responses model=google/gemma-4-e4b status=200 elapsedMs=6 contentType=text/event-stream
17:15:14 [openai-transport] [responses] headers provider=lmstudio api=openai-responses model=google/gemma-4-e4b elapsedMs=8
… 18 lines omitted …
17:15:19 [openai-transport] [responses] headers provider=lmstudio api=openai-responses model=google/gemma-4-e4b elapsedMs=8
17:15:19 [openai-transport] [responses] first_event provider=lmstudio api=openai-responses model=google/gemma-4-e4b elapsedMs=5 type=response.created
17:15:21 [openai-transport] [responses] stream_done provider=lmstudio api=openai-responses model=google/gemma-4-e4b elapsedMs=2145 events=79 types=response.created:1,response.in_progress:1,response.output_item.added:2,response.content_part.added:1,response.reasoning_text.delta:68,response.reasoning_text.done:1,response.content_part.done:1,response.output_item.done:2,response.function_call_arguments.done:1,response.completed:1 stopReason=toolUse contentBlocks=2
17:15:21 [agent/embedded] embedded run tool start
17:15:21 [agent/embedded] embedded run tool start: runId=3c2a3c23-a367-486d-82be-0f01e80f52be tool=read toolCallId=call_1339242629660211|fc_2z2c1vb9e6ydqcp3hw2n9u
17:15:21 [agent/embedded] embedded run tool end: runId=3c2a3c23-a367-486d-82be-0f01e80f52be tool=read toolCallId=call_1339242629660211|fc_2z2c1vb9e6ydqcp3hw2n9u
17:15:21 [openai-transport] [responses] start provider=lmstudio api=openai-responses model=google/gemma-4-e4b baseUrl=http://localhost:1234/v1 timeoutMs=600000 apiKey=***s=include,input,max_output_tokens,model,prompt_cache_key,prompt_cache_retention,reasoning,store,stream,tools model=google/gemma-4-e4b stream=true inputItems=14 inputRoles=system,user inputTextChars=19508 tools=count=30 sample=agents_list,browser,cron,diffs,edit,exec,gateway,image,lcm_describe,lcm_expand,lcm_expand_query,lcm_grep reasoningEffort=medium reasoningSummary=auto textVerbosity=undefined serviceTier=undefined store=false promptCacheKey=present metadataKeys=none
17:15:21 [provider-transport-fetch] [model-fetch] start provider=lmstudio api=openai-responses model=google/gemma-4-e4b method=POST url=http://localhost:1234/v1/responses timeoutMs=600000 proxy=none policy=custom
17:15:21 [provider-transport-fetch] [model-fetch] response provider=lmstudio api=openai-responses model=google/gemma-4-e4b status=200 elapsedMs=5 contentType=text/event-stream
17:15:21 [openai-transport] [responses] headers provider=lmstudio api=openai-responses model=google/gemma-4-e4b elapsedMs=8
17:15:21 [openai-transport] [responses] first_event provider=lmstudio api=openai-responses model=google/gemma-4-e4b elapsedMs=4 type=response.created
17:15:23 [openai-transport] [responses] stream_done provider=lmstudio api=openai-responses model=google/gemma-4-e4b elapsedMs=1864 events=60 types=response.created:1,response.in_progress:1,response.output_item.added:2,response.content_part.added:1,response.reasoning_text.delta:49,response.reasoning_text.done:1,response.content_part.done:1,response.output_item.done:2,response.function_call_arguments.done:1,response.completed:1 stopReason=toolUse contentBlocks=2
17:15:23 [agent/embedded] embedded run tool start
17:15:23 [agent/embedded] embedded run tool start: runId=3c2a3c23-a367-486d-82be-0f01e80f52be tool=read toolCallId=call_1339242629660212|fc_pk26hpdbeu73i93ya5pmg
17:15:23 [agent/embedded] embedded run tool end: runId=3c2a3c23-a367-486d-82be-0f01e80f52be tool=read toolCallId=call_1339242629660212|fc_pk26hpdbeu73i93ya5pmg
✓ Channel issues (none)
---
### Tool-call test on LMstudio
This test demonstrates the issue is not at the provider layer
**Test**:
curl http://localhost:1234/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemma-4-26b-a4b",
"messages": [
{
"role": "user",
"content": "Call check_cron_logs with filter set to \"failure\" and limit set to 5."
}
],
"tools": [
{
"type": "function",
"function": {
"name": "check_cron_logs",
"description": "Search recent cron execution logs for specific error patterns or status.",
"parameters": {
"type": "object",
"properties": {
"filter": {"type": "string", "description": "The error pattern or keyword to search for (e.g., \"failure\", \"timeout\")."},
"limit": {"type": "integer", "description": "Number of recent log entries to return."}
},
"required": ["filter", "limit"]
}
}
}
],
"tool_choice": "auto",
"stream": false
}'
**Result:**
{
"id": "chatcmpl-t2w60hqt77g860rv3x3v6k",
"object": "chat.completion",
"created": 1780196547,
"model": "google/gemma-4-26b-a4b",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "",
"reasoning_content": "\nThe user wants to call the `check_cron_logs` tool with specific arguments: `filter=\"failure\"` and `limit=5`. I should construct a tool call for this request.",
"tool_calls": [
{
"type": "function",
"id": "578374926",
"function": {
"name": "check_cron_logs",
"arguments": "{\"filter\":\"failure\",\"limit\":5}"
}
}
]
},
"logprobs": null,
"finish_reason": "tool_calls"
}
],
"usage": {
"prompt_tokens": 136,
"completion_tokens": 64,
"total_tokens": 200,
"completion_tokens_details": {
"reasoning_tokens": 40
}
},
"stats": {},
"system_fingerprint": "google/gemma-4-26b-a4b"
}
Impact and severity
Impact: Breaking to implementations that rely on LMStudio local models.
Severity: Blocks mission-critical processes and workflows.
Frequency: Every time a tool-call with params is sent.
Consequence: Shuttered operations; OR exposed proprietary data + sharp increase in provider fees.
Additional information
What actually fixed it
-
Temporary solution: Recovered ~/.openclaw, ~/openclaw and /opt/homebrew/lib/node_modules/openclaw to 2026.5.26.
-
Applied a hot patch to 2026.6.1, File: /opt/homebrew/lib/node_modules/openclaw/dist/openai-responses-shared-BVt5jM-F.js.
Patch details:
Find:
const previousPartialJson = currentBlock.partialJson;
currentBlock.partialJson = event.arguments;
currentBlock.arguments = parseStreamingJson(currentBlock.partialJson);
if (event.arguments.startsWith(previousPartialJson)) {
const delta = event.arguments.slice(previousPartialJson.length);
Replace:
const previousPartialJson = currentBlock.partialJson;
const doneArguments = typeof event.arguments === "string" ? event.arguments : "";
if (doneArguments.length > 0) {
currentBlock.partialJson = doneArguments;
currentBlock.arguments = parseStreamingJson(currentBlock.partialJson);
}
if (doneArguments.startsWith(previousPartialJson)) {
const delta = doneArguments.slice(previousPartialJson.length);
openai-responses-shared-BVt5jM-F.js
REGRESSION-ToolCalls-with-args-arrive-as-empty-objects-when-using-LM-Studio.md
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
After updating OpenClaw from 2026.5.26 to 2026.5.27, an agent using an LM Studio model can still initiate tool calls, but any tool call that requires arguments arrives at the executor with an empty/missing argument object. Parameterless tool calls still work.
Rolling back to 2026.5.26 resolved the issue.
Updating to 2026.6.1 surfaced the issue again. This time I traced it to the source and applied a hot patch. The patch is included in my report and I've attached the complete module to this issue.
Steps to reproduce
Expected behavior
The LM Studio-backed agent3 should be able to call tools with arguments, e.g.
readwith apath, orexecwith a command, as it did on 2026.5.26.Actual behavior
session_status{}.Example agent-facing failure:
> I am unable to pass any arguments or parameters to tools like
execorread. Every attempt to provide a command or path is arriving at the tool executor as an empty object{}.Things I tried
agents.defaults.experimental.localModelLean: true: Issue persisted.openclaw infer model runagainst the same LM Studio model without tool calls: It worked./resetand/newon every model tested: Issue persisted across all local modelsopenclaw config set agents.defaults.models '{"lmslmstudio/google/gemma-4-26b-a4b":{"params":{"extra_body":{"tool_choice":"required"}}}}' --strict-json --merge: Issue persisted.openai-responsestoopenai-completions: Issue persisted.Why this looks like a regression
openai-responses-shared-BVt5jM-F_ORIGINAL_202606042111.js
openai-responses-shared-BVt5jM-F.js
OpenClaw version
2026.5.27, OpenClaw 2026.6.1 (2e08f0f)
Operating system
macOS 26.4.1
Install method
npm global
Model
google/gemma-4-e2b
Provider / routing chain
openclaw -> LMStudio
Additional provider/model setup details
Config excerpt - 2026.5.27 version
Logs, screenshots, and evidence
Impact and severity
Impact: Breaking to implementations that rely on LMStudio local models.
Severity: Blocks mission-critical processes and workflows.
Frequency: Every time a tool-call with params is sent.
Consequence: Shuttered operations; OR exposed proprietary data + sharp increase in provider fees.
Additional information
What actually fixed it
Temporary solution: Recovered
~/.openclaw,~/openclawand/opt/homebrew/lib/node_modules/openclawto 2026.5.26.Applied a hot patch to 2026.6.1, File:
/opt/homebrew/lib/node_modules/openclaw/dist/openai-responses-shared-BVt5jM-F.js.Patch details:
Find:
Replace:
openai-responses-shared-BVt5jM-F.js
REGRESSION-ToolCalls-with-args-arrive-as-empty-objects-when-using-LM-Studio.md