openclaw - 💡(How to fix) Fix [Bug]: Tool calls silently hang after extended session with heavy tool usage [5 comments, 4 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#51022Fetched 2026-04-08 01:05:27
View on GitHub
Comments
5
Participants
4
Timeline
7
Reactions
0
Author
Timeline (top)
commented ×5labeled ×2

Description: After a long session involving many tool calls (exec, read, write, file operations), tool calls stop executing. The model outputs a tool call normally (confirmed in LM Studio logs - generation completes successfully), but OpenClaw never executes it and the session hangs indefinitely.

Starting a new session immediately restores normal behavior.

Steps to reproduce:

  1. Start a session
  2. Perform many tool calls over an extended period (file reads, exec, writes)
  3. At some point, tool calls stop executing - model generates the call but nothing happens

Expected: Tool calls execute normally throughout the session Actual: Tool calls silently hang after extended use; new session required to recover

Environment:

  • OpenClaw 2026.3.13
  • Model: Qwen3.5-35B via LM Studio (OpenAI-compatible endpoint)
  • OS: Ubuntu 22.04
  • compaction.mode: safeguard

Error Message

After extended use with heavy tool calls, the model continues to generate tool call output normally (confirmed via LM Studio logs), but OpenClaw never executes the tool. The session hangs indefinitely with no error message. Starting a new session immediately restores normal behavior.

Root Cause

Description: After a long session involving many tool calls (exec, read, write, file operations), tool calls stop executing. The model outputs a tool call normally (confirmed in LM Studio logs - generation completes successfully), but OpenClaw never executes it and the session hangs indefinitely.

Starting a new session immediately restores normal behavior.

Steps to reproduce:

  1. Start a session
  2. Perform many tool calls over an extended period (file reads, exec, writes)
  3. At some point, tool calls stop executing - model generates the call but nothing happens

Expected: Tool calls execute normally throughout the session Actual: Tool calls silently hang after extended use; new session required to recover

Environment:

  • OpenClaw 2026.3.13
  • Model: Qwen3.5-35B via LM Studio (OpenAI-compatible endpoint)
  • OS: Ubuntu 22.04
  • compaction.mode: safeguard
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Summary

Description: After a long session involving many tool calls (exec, read, write, file operations), tool calls stop executing. The model outputs a tool call normally (confirmed in LM Studio logs - generation completes successfully), but OpenClaw never executes it and the session hangs indefinitely.

Starting a new session immediately restores normal behavior.

Steps to reproduce:

  1. Start a session
  2. Perform many tool calls over an extended period (file reads, exec, writes)
  3. At some point, tool calls stop executing - model generates the call but nothing happens

Expected: Tool calls execute normally throughout the session Actual: Tool calls silently hang after extended use; new session required to recover

Environment:

  • OpenClaw 2026.3.13
  • Model: Qwen3.5-35B via LM Studio (OpenAI-compatible endpoint)
  • OS: Ubuntu 22.04
  • compaction.mode: safeguard

Steps to reproduce

  1. Configure OpenClaw with a local LLM via LM Studio (OpenAI-compatible endpoint)
  2. Start a session and perform repeated tool calls (exec, read, write, file operations)
  3. Continue the session for an extended period with heavy tool usage
  4. Observe that at some point, tool calls stop executing silently
  5. Confirm in LM Studio logs that the model is generating tool call output normally
  6. Send another message — session hangs, no tool execution
  7. Start a new session — tool calls work normally again

Expected behavior

Tool calls should execute correctly throughout the entire session lifetime, regardless of session length or number of prior tool calls.

Actual behavior

After extended use with heavy tool calls, the model continues to generate tool call output normally (confirmed via LM Studio logs), but OpenClaw never executes the tool. The session hangs indefinitely with no error message. Starting a new session immediately restores normal behavior.

OpenClaw version

2026.3.13

Operating system

ubuntu22.04

Install method

No response

Model

lmtudio-qwen3.5 35B

Provider / routing chain

LM Studio (local) → OpenAI-compatible endpoint (http://192.168.1.166:1235/v1) → Qwen3.5-35B

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

Fix Plan

To resolve the issue of tool calls stopping execution after an extended period, we need to implement a mechanism to handle potential resource leaks or timeouts in OpenClaw. Here are the steps:

  • Increase the timeout value: Modify the OpenClaw configuration to increase the timeout for tool executions. This can be done by adding a timeout parameter in the OpenClaw configuration file.
  • Implement a retry mechanism: Add a retry mechanism for tool executions to handle temporary failures. This can be achieved by using a library like tenacity in Python.
  • Optimize resource usage: Review the OpenClaw code to optimize resource usage and prevent potential resource leaks.

Example code snippet to increase the timeout value:

import openclaw

# Increase the timeout value to 300 seconds
openclaw.config.timeout = 300

Example code snippet to implement a retry mechanism:

import tenacity

@tenacity.retry(wait=tenacity.wait_exponential(multiplier=1, min=4, max=10))
def execute_tool_call(tool_call):
    # Execute the tool call
    openclaw.execute_tool_call(tool_call)

Verification

To verify that the fix worked, follow these steps:

  • Start a new session and perform repeated tool calls.
  • Monitor the session for an extended period to ensure that tool calls continue to execute correctly.
  • Check the LM Studio logs to confirm that the model is generating tool call output normally.

Extra Tips

  • Regularly review and optimize the OpenClaw configuration and code to prevent similar issues.
  • Consider implementing a monitoring system to detect and alert on potential issues with tool executions.
  • Test the retry mechanism thoroughly to ensure it handles temporary failures correctly.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Tool calls should execute correctly throughout the entire session lifetime, regardless of session length or number of prior tool calls.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING