openclaw - ✅(Solved) Fix [Bug] read tool called without path causes silent failure [1 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#62462Fetched 2026-04-08 03:04:01
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Timeline (top)
cross-referenced ×1referenced ×1

Error Message

When the read tool is invoked without a 'path' parameter, the tool returns success but produces no output. The model receives an empty result without any error or warning, making it appear the read succeeded but returned nothing.

  • Should return explicit error: 'path parameter is required'

Fix Action

Fixed

PR fix notes

PR #62504: fix: read tool without path now returns explicit error

Description (problem / solution / changelog)

Summary

This PR fixes #62462 by preventing silent success when the read tool is invoked without a required path.

Changes

  • Convert warning-only missing-path handling in embedded read-tool start flow into an explicit required-parameter error.
  • Update handler tests to assert failure semantics for missing path.
  • Add a regression test for wrapped read-tool execution when path is missing.

Validation

  • node scripts/run-vitest.mjs run --config vitest.config.ts src/agents/pi-tools.create-openclaw-coding-tools.adds-claude-style-aliases-schemas-without-dropping-g.test.ts src/agents/pi-embedded-subscribe.handlers.tools.test.ts
  • pnpm -s vitest run src/agents/pi-tools.params.test.ts
  • pnpm -s vitest run src/agents/pi-tool-definition-adapter.after-tool-call.fires-once.test.ts src/agents/pi-embedded-subscribe.handlers.tools.media.test.ts src/agents/pi-embedded-subscribe.subscribe-embedded-pi-session.calls-onblockreplyflush-before-tool-execution-start-preserve.test.ts

Notes

Repository-wide lint/build checks in this branch baseline currently fail due unrelated pre-existing issues.

Changed files

  • src/agents/pi-embedded-subscribe.handlers.tools.test.ts (modified, +5/-5)
  • src/agents/pi-embedded-subscribe.handlers.tools.ts (modified, +9/-4)
  • src/agents/pi-tools.create-openclaw-coding-tools.adds-claude-style-aliases-schemas-without-dropping-g.test.ts (modified, +76/-0)
  • src/agents/pi-tools.read.ts (modified, +74/-3)

Code Example

[agent/embedded] read tool called without path: toolCallId=call_function_6y0ce9pf2dmq_1 argsType=object
RAW_BUFFERClick to expand / collapse

Bug Description

When the read tool is invoked without a 'path' parameter, the tool returns success but produces no output. The model receives an empty result without any error or warning, making it appear the read succeeded but returned nothing.

Steps to Reproduce

  1. Call read tool with argsType=object but missing path field
  2. Observe: toolCallId logged as 'read tool called without path' in gateway.err.log

Frequency

15+ occurrences observed in single day (2026-04-07)

Log Evidence

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

Expected Behavior

  • Should return explicit error: 'path parameter is required'
  • Should NOT log as 'called without path' as if it was intentional

Severity

Medium - causes silent data loss, model makes decisions on empty context

extent analysis

TL;DR

The most likely fix involves modifying the read tool to validate the presence of the 'path' parameter and return an explicit error when it's missing.

Guidance

  • Verify that the read tool's input validation logic is correctly checking for the presence of the 'path' parameter in the argsType object.
  • Check the logging configuration to ensure that the 'read tool called without path' log message is not masking the actual error.
  • Consider adding a default error handling mechanism to return a meaningful error message when the 'path' parameter is missing.
  • Review the model's behavior to handle cases where the read tool returns an empty result without an error.

Example

if (!argsType.path) {
  throw new Error('path parameter is required');
}

Notes

The provided log evidence suggests that the tool is aware of the missing 'path' parameter, but it's not being handled as an error. The fix should focus on improving the input validation and error handling in the read tool.

Recommendation

Apply workaround: Modify the read tool to validate the 'path' parameter and return an explicit error when it's missing, as this will prevent silent data loss and ensure the model receives accurate feedback.

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