openclaw - 💡(How to fix) Fix [Bug]: WorkClaw-exec工具执行卡死Bug反馈 [1 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#60861Fetched 2026-04-08 02:46:20
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
labeled ×2

WorkClaw-exec工具执行卡死Bug反馈

Error Message

The exec tool hangs indefinitely — the agent enters a loop of "Thinking" → calling exec → "Thinking" without ever receiving a result. No error message is displayed. The user is forced to manually stop/refresh the session.

Root Cause

WorkClaw-exec工具执行卡死Bug反馈

RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

Yes

Summary

WorkClaw-exec工具执行卡死Bug反馈

Steps to reproduce

GitHub-Issue-待提交.md WorkClaw-exec工具执行卡死Bug反馈.md

Expected behavior

xec tool should execute the command and return the stdout/stderr output to the agent within the specified timeout period, allowing the agent to proceed with the next step.

Specifically, when the agent calls exec to run: uv run python "read_file.py" "some-file.pdf"

The tool should return the script's output (extracted PDF text) back to the agent, not hang indefinitely. The exact same command runs correctly in PowerShell and cmd.exe terminals.

Actual behavior

The exec tool hangs indefinitely — the agent enters a loop of "Thinking" → calling exec → "Thinking" without ever receiving a result. No error message is displayed. The user is forced to manually stop/refresh the session.

Evidence:

  • The same command runs correctly in PowerShell and cmd.exe, returning output immediately
  • The bug only occurs through WorkClaw's exec tool
  • Reproduces consistently with PDF files (different sizes, different filenames)
  • WorkBuddy (another client using the same LM Studio backend) handles the same task without issues
  • OpenClaw gateway logs show the request reaches the model and gets a response, but the exec tool never delivers it back to the agent

OpenClaw version

v0.4.6

Operating system

win11

Install method

Other

Model

lmstudio/Qwen3.5-9B (local, port 1234)

Provider / routing chain

OpenClaw -> LM Studio (localhost:1234) -> Qwen3.5-9B

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The issue can be mitigated by investigating the differences in how the exec tool handles command execution compared to PowerShell and cmd.exe, focusing on potential issues with output handling or timeouts.

Guidance

  • Review the exec tool's implementation to ensure it properly handles stdout/stderr output from the executed command, especially for commands that produce large output like PDF text extraction.
  • Compare the execution environment and parameters used by the exec tool with those of PowerShell and cmd.exe to identify any discrepancies that could cause the hanging behavior.
  • Investigate the OpenClaw gateway logs further to understand why the response from the model is not being delivered back to the agent, checking for any signs of timeouts, connection issues, or data corruption.
  • Test the exec tool with simpler commands to see if the issue is specific to the uv run python command or if it's a more general problem with command execution.

Example

No specific code example can be provided without more details on the exec tool's implementation, but a simple test script to execute a command and print its output could help isolate the issue:

import subprocess

def execute_command(command):
    try:
        output = subprocess.check_output(command, shell=True)
        print(output.decode('utf-8'))
    except subprocess.CalledProcessError as e:
        print(f"Command failed with return code {e.returncode}")

# Example usage
command = "uv run python read_file.py some-file.pdf"
execute_command(command)

Notes

The exact cause of the issue is unclear without more information about the exec tool's implementation and the specific environment in which it's running. The fact that the same command works in PowerShell and cmd.exe suggests an issue specific to the exec tool or its interaction with the OpenClaw gateway.

Recommendation

Apply workaround: Given the information provided, it seems prudent to apply a workaround rather than waiting for a potential fix, such as using an alternative method for executing commands that does not hang, or implementing a timeout mechanism to prevent indefinite hanging.

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

xec tool should execute the command and return the stdout/stderr output to the agent within the specified timeout period, allowing the agent to proceed with the next step.

Specifically, when the agent calls exec to run: uv run python "read_file.py" "some-file.pdf"

The tool should return the script's output (extracted PDF text) back to the agent, not hang indefinitely. The exact same command runs correctly in PowerShell and cmd.exe terminals.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: WorkClaw-exec工具执行卡死Bug反馈 [1 participants]