openclaw - ✅(Solved) Fix [Bug] read tool diagnostic guard missing "file" and "filePath" aliases — false "read tool called without path" warnings [3 pull requests, 1 participants]

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…
GitHub stats
openclaw/openclaw#60008Fetched 2026-04-08 02:37:32
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×2referenced ×1

The handleToolExecutionStart diagnostic guard for the read tool only checks record.path and record.file_path, but the tool schema exposes 4 parameter aliases: path, file_path, file, filePath.

Claude models commonly send file as the parameter name. This triggers false [WARN] read tool called without path warnings even though the tool itself succeeds via later normalization in normalizeToolParams().

Error Message

Claude models commonly send file as the parameter name. This triggers false [WARN] read tool called without path warnings even though the tool itself succeeds via later normalization in normalizeToolParams().

Root Cause

The handleToolExecutionStart diagnostic guard for the read tool only checks record.path and record.file_path, but the tool schema exposes 4 parameter aliases: path, file_path, file, filePath.

Claude models commonly send file as the parameter name. This triggers false [WARN] read tool called without path warnings even though the tool itself succeeds via later normalization in normalizeToolParams().

Fix Action

Fix

Add the missing aliases to the ternary chain:

if (!(typeof record.path === "string" ? record.path : typeof record.file_path === "string" ? record.file_path : typeof record.file === "string" ? record.file : typeof record.filePath === "string" ? record.filePath : "").trim())

PR fix notes

PR #60058: fix(pi): use resolvePathArg for read tool path alias in handler

Description (problem / solution / changelog)

Summary

The diagnostic guard in handleToolExecutionStart for the read tool was manually checking only the path and file_path arg aliases, missing the filePath camelCase alias.

The existing resolvePathArg utility in tool-display-common.ts already handles all three aliases (path, file_path, filePath). This PR replaces the inline alias lookup with a call to resolvePathArg, fixing the missed alias and reducing duplication.

Test plan

  • Call read tool with { filePath: "..." } — warning should no longer fire incorrectly
  • Existing handler tests pass (30 tests)

Fixes #60008

🤖 Generated with Claude Code

Changed files

  • src/agents/pi-embedded-subscribe.handlers.tools.ts (modified, +2/-8)

PR #60325: fix: accept read path aliases in diagnostic guard

Description (problem / solution / changelog)

Summary

  • accept file and filePath aliases in the read-tool diagnostic guard
  • keep the existing warning when no supported path alias is present
  • add targeted test coverage for all supported read path aliases

Problem

Issue #60008 reports false warnings from the embedded tool diagnostic path:

  • read tool called without path

The read tool itself already accepts multiple path aliases via later normalization, but handleToolExecutionStart() only checked path and file_path before logging the warning. When models used file or filePath, the tool could still succeed while the diagnostic layer emitted misleading warnings.

Fix

Narrowly update handleToolExecutionStart() in src/agents/pi-embedded-subscribe.handlers.tools.ts so the read-path diagnostic check recognizes all supported aliases:

  • path
  • file_path
  • file
  • filePath

This keeps the warning behavior intact for truly missing paths while removing false positives for valid alias usage.

Tests

Added targeted coverage in src/agents/pi-embedded-subscribe.handlers.tools.test.ts to verify:

  • no warning for path
  • no warning for file_path
  • no warning for file
  • no warning for filePath
  • warning still occurs when none of the supported aliases are present

Ran:

  • corepack pnpm vitest run src/agents/pi-embedded-subscribe.handlers.tools.test.ts -t "handleToolExecutionStart read path checks"

Notes

The broader test file currently contains unrelated failing tests on main, so validation here is intentionally scoped to the read-path diagnostic cases touched by this change.

Changed files

  • src/agents/pi-embedded-subscribe.handlers.tools.test.ts (modified, +8/-3)
  • src/agents/pi-embedded-subscribe.handlers.tools.ts (modified, +5/-1)

PR #68296: fix(agents): add file and filePath aliases to read tool diagnostic path check

Description (problem / solution / changelog)

Summary

  • The read tool diagnostic guard in handleToolExecutionStart only checked path and file_path when deciding whether to emit a "read tool called without path" warning
  • Models like Claude commonly use file and filePath as the parameter name
  • This triggered false-positive log warnings even though the tool itself succeeds via normalization in normalizeToolParams()

Change Type

  • Bug fix

Scope

  • Skills / tool execution

Linked Issue/PR

  • Closes #60008

Root Cause

handleToolExecutionStart resolves the read tool path from record.path and record.file_path only. The file and filePath aliases — which Claude models commonly emit — were not checked, causing spurious warnings that can flood logs and cascade into retry loops.

Fix

Extended the ternary chain to also check record.file and record.filePath before falling back to the empty string. Added test cases for both new aliases.

Changed files

  • src/agents/pi-embedded-subscribe.handlers.tools.test.ts (modified, +33/-1)
  • src/agents/pi-embedded-subscribe.handlers.tools.ts (modified, +5/-1)

Code Example

// Current (line ~31969):
if (!(typeof record.path === "string" ? record.path : typeof record.file_path === "string" ? record.file_path : "").trim())

---

if (!(typeof record.path === "string" ? record.path : typeof record.file_path === "string" ? record.file_path : typeof record.file === "string" ? record.file : typeof record.filePath === "string" ? record.filePath : "").trim())
RAW_BUFFERClick to expand / collapse

Description

The handleToolExecutionStart diagnostic guard for the read tool only checks record.path and record.file_path, but the tool schema exposes 4 parameter aliases: path, file_path, file, filePath.

Claude models commonly send file as the parameter name. This triggers false [WARN] read tool called without path warnings even though the tool itself succeeds via later normalization in normalizeToolParams().

Impact

  • Log flooding (hundreds of warnings/day)
  • In some code paths, the warning can cascade into retry loops → agent timeout → failover
  • Affects both Claude (sends file) and GPT models (varying aliases)

Affected version

OpenClaw 2026.4.1 (da64a97). Also confirmed present in 2026.4.2.

Location

pi-embedded-*.js (bundled), function handleToolExecutionStart:

// Current (line ~31969):
if (!(typeof record.path === "string" ? record.path : typeof record.file_path === "string" ? record.file_path : "").trim())

Fix

Add the missing aliases to the ternary chain:

if (!(typeof record.path === "string" ? record.path : typeof record.file_path === "string" ? record.file_path : typeof record.file === "string" ? record.file : typeof record.filePath === "string" ? record.filePath : "").trim())

Related issues

  • #2596 (closed, partial fix for file_path only)
  • The file and filePath aliases were not covered by that fix

extent analysis

TL;DR

Update the handleToolExecutionStart diagnostic guard in pi-embedded-*.js to include checks for the file and filePath parameter aliases.

Guidance

  • Verify that the handleToolExecutionStart function is correctly handling the file and filePath aliases by checking the function's logic and testing it with different input parameters.
  • Update the handleToolExecutionStart function to include the missing aliases in the ternary chain, as shown in the proposed fix.
  • Test the updated function to ensure that it no longer triggers false warnings when the file parameter is used.
  • Consider reviewing related issues, such as #2596, to ensure that all relevant fixes are applied.

Example

The updated handleToolExecutionStart function should include the following code:

if (!(typeof record.path === "string" ? record.path : typeof record.file_path === "string" ? record.file_path : typeof record.file === "string" ? record.file : typeof record.filePath === "string" ? record.filePath : "").trim())

Notes

This fix only applies to OpenClaw versions 2026.4.1 and 2026.4.2, and may not be relevant to other versions.

Recommendation

Apply the workaround by updating the handleToolExecutionStart function to include the missing aliases, as this will fix the issue and prevent false warnings.

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