openclaw - 💡(How to fix) Fix [BUG] read tool called without path - embedded agent warning

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

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…

Error Message

ctx.log.warn(read tool called without path: toolCallId=${toolCallId} argsType=${typeof args}${argsPreview ? argsPreview=${argsPreview} : ""});

Root Cause

The warning originates from auth-profiles-<hash>.js line ~164790, in the handleToolExecutionStart() function:

if (toolName === "read") {
    const record = args && typeof args === "object" ? args : {};
    const path = typeof record.path === "string" ? record.path : typeof record.file_path === "string" ? record.file_path : "";
    if (!path.trim()) {
        const argsPreview = typeof args === "string" ? args.slice(0, 200) : void 0;
        ctx.log.warn(`read tool called without path: toolCallId=${toolCallId} argsType=${typeof args}${argsPreview ? ` argsPreview=${argsPreview}` : ""}`);
    }
}

Code Example

[agent/embedded] read tool called without path: toolCallId=call_function_xxx argsType=object

---

if (toolName === "read") {
    const record = args && typeof args === "object" ? args : {};
    const path = typeof record.path === "string" ? record.path : typeof record.file_path === "string" ? record.file_path : "";
    if (!path.trim()) {
        const argsPreview = typeof args === "string" ? args.slice(0, 200) : void 0;
        ctx.log.warn(`read tool called without path: toolCallId=${toolCallId} argsType=${typeof args}${argsPreview ? ` argsPreview=${argsPreview}` : ""}`);
    }
}
RAW_BUFFERClick to expand / collapse

Bug Description

Embedded agent sessions emit a warning log:

[agent/embedded] read tool called without path: toolCallId=call_function_xxx argsType=object

Root Cause

The warning originates from auth-profiles-<hash>.js line ~164790, in the handleToolExecutionStart() function:

if (toolName === "read") {
    const record = args && typeof args === "object" ? args : {};
    const path = typeof record.path === "string" ? record.path : typeof record.file_path === "string" ? record.file_path : "";
    if (!path.trim()) {
        const argsPreview = typeof args === "string" ? args.slice(0, 200) : void 0;
        ctx.log.warn(`read tool called without path: toolCallId=${toolCallId} argsType=${typeof args}${argsPreview ? ` argsPreview=${argsPreview}` : ""}`);
    }
}

Problem

When an embedded agent (via session-fork or subagent) calls the read tool, the path parameter is not being passed through to the tool handler. The tool is being invoked with an empty args object or with missing path fields.

Impact

  • Excessive warning logs flood the output on every embedded agent tool call
  • Indicates a bug in how tool arguments are forwarded in session-fork/subagent contexts

Occurrence

Observed at:

  • 08:00:28 +08:00 — embedded agent read tool call without path
  • 08:00:39 +08:00 — repeated

Environment

  • openclaw version: latest
  • Platform: Windows_NT
  • Node.js: v24.15.0
  • Runtime: main session with embedded agent sessions

Expected Behavior

The read tool should always receive a valid path parameter when called. If the agent cannot determine the path, it should not call the tool at all rather than calling it with a missing path and emitting a warning.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING