openclaw - ✅(Solved) Fix [Bug]: Tool display missing file path when model uses "file" parameter alias [4 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#54882Fetched 2026-04-08 01:34:52
View on GitHub
Comments
0
Participants
1
Timeline
16
Reactions
0
Participants
Timeline (top)
cross-referenced ×8referenced ×8

When the model calls the Read, Write, or Edit tool using the file parameter alias (instead of path, file_path, or filePath), the verbose/block-streaming tool summary shows only the bare emoji + label (e.g. 📖 Read) without the file path detail.

The tool executes correctlynormalizeToolParams() in pi-tools.params.ts properly maps all 4 aliases (path, file_path, filePath, file) to path. The bug is only in the display layer.

Root Cause

When the model calls the Read, Write, or Edit tool using the file parameter alias (instead of path, file_path, or filePath), the verbose/block-streaming tool summary shows only the bare emoji + label (e.g. 📖 Read) without the file path detail.

The tool executes correctlynormalizeToolParams() in pi-tools.params.ts properly maps all 4 aliases (path, file_path, filePath, file) to path. The bug is only in the display layer.

Fix Action

Fixed

PR fix notes

PR #54887: fix: add "file" param alias to tool display path resolution

Description (problem / solution / changelog)

Fixes #54882

Problem

When the model calls Read, Write, or Edit using the file parameter alias, the verbose tool summary shows only the bare emoji + label (e.g. 📖 Read) without the file path.

The tool executes correctlynormalizeToolParams() already maps all 4 aliases to path. The bug is only in the display layer.

Changes

  • src/agents/tool-display-common.ts — added record.file to resolvePathArg() candidates
  • src/agents/pi-embedded-subscribe.handlers.tools.ts — added record.filePath and record.file checks in handleToolExecutionStart()
  • apps/shared/OpenClawKit/Sources/OpenClawKit/Resources/tool-display.json — extended detailKeys for read, write, edit to include all 4 aliases

Testing

Trigger a Read/Write/Edit tool call where the model uses the file parameter (Claude Opus/Sonnet 4+ tend to prefer this alias) with /verbose on — file path now appears correctly in the tool summary.

Changed files

  • apps/shared/OpenClawKit/Sources/OpenClawKit/Resources/tool-display.json (modified, +3/-3)
  • src/agents/pi-embedded-subscribe.handlers.tools.ts (modified, +5/-1)
  • src/agents/tool-display-common.ts (modified, +1/-1)

PR #54891: fix: show file alias paths in tool display

Description (problem / solution / changelog)

Summary

  • teach tool display path resolution to honor the file alias in addition to path, file_path, and filePath
  • reuse the shared path resolver for read-tool start validation so warnings stay aligned with display behavior
  • cover the alias handling in tool display and embedded subscribe tests

Closes #54882

Testing

  • pnpm exec vitest run src/agents/pi-embedded-subscribe.handlers.tools.test.ts src/agents/tool-display.test.ts

Changed files

  • apps/shared/OpenClawKit/Sources/OpenClawKit/Resources/tool-display.json (modified, +3/-3)
  • src/agents/pi-embedded-subscribe.handlers.tools.test.ts (modified, +30/-0)
  • src/agents/pi-embedded-subscribe.handlers.tools.ts (modified, +2/-8)
  • src/agents/tool-display-common.ts (modified, +1/-1)
  • src/agents/tool-display.test.ts (modified, +3/-3)

PR #54923: fix: include all file parameter aliases in tool display resolution

Description (problem / solution / changelog)

Fixes #54882

Problem

When models use the file parameter alias (instead of path, file_path, or filePath) for Read/Write/Edit tools, the verbose tool display shows only the emoji + label without the file path.

Fix

Three changes:

  1. resolvePathArg() — added record.file to candidates
  2. handleToolExecutionStart() — added record.filePath and record.file fallbacks
  3. tool-display.json — added all aliases to detailKeys for read/write/edit

Impact

All 4 parameter aliases now produce consistent verbose display with file path.

Changed files

  • apps/shared/OpenClawKit/Sources/OpenClawKit/Resources/tool-display.json (modified, +3/-3)
  • src/agents/pi-embedded-subscribe.handlers.tools.ts (modified, +5/-1)
  • src/agents/tool-display-common.ts (modified, +1/-1)

PR #54951: fix: show file alias in tool display summaries

Description (problem / solution / changelog)

Summary\n- include the supported file alias when resolving tool display path details\n- add a regression test covering read/write/edit summaries that use file\n\n## Testing\n- attempted: pnpm test -- src/agents/tool-display.test.ts (blocked in this environment because the temp checkout had no node_modules, and pnpm install hit npm registry DNS EAI_AGAIN failures)\n\nCloses #54882

Changed files

  • src/agents/tool-display-common.ts (modified, +1/-1)
  • src/agents/tool-display.test.ts (modified, +25/-0)

Code Example

// Current (line ~218):
for (const candidate of [record.path, record.file_path, record.filePath]) {
// Missing: record.file

---

// Current (line ~305):
const filePathValue =
    typeof record.path === "string"
        ? record.path
        : typeof record.file_path === "string"
            ? record.file_path
            : "";
// Missing: record.filePath and record.file

---

"read": {
    "emoji": "📖",
    "title": "Read",
    "detailKeys": ["path"]  // Missing: "file", "filePath", "file_path"
}
RAW_BUFFERClick to expand / collapse

Description

When the model calls the Read, Write, or Edit tool using the file parameter alias (instead of path, file_path, or filePath), the verbose/block-streaming tool summary shows only the bare emoji + label (e.g. 📖 Read) without the file path detail.

The tool executes correctlynormalizeToolParams() in pi-tools.params.ts properly maps all 4 aliases (path, file_path, filePath, file) to path. The bug is only in the display layer.

Affected code

1. src/agents/tool-display-common.tsresolvePathArg()

// Current (line ~218):
for (const candidate of [record.path, record.file_path, record.filePath]) {
// Missing: record.file

2. src/agents/pi-embedded-subscribe.handlers.tools.tshandleToolExecutionStart()

// Current (line ~305):
const filePathValue =
    typeof record.path === "string"
        ? record.path
        : typeof record.file_path === "string"
            ? record.file_path
            : "";
// Missing: record.filePath and record.file

3. apps/shared/OpenClawKit/Sources/OpenClawKit/Resources/tool-display.json

"read": {
    "emoji": "📖",
    "title": "Read",
    "detailKeys": ["path"]  // Missing: "file", "filePath", "file_path"
}

Steps to reproduce

  1. Enable /verbose on
  2. Trigger a Read tool call where the model uses the file parameter (Claude Opus/Sonnet 4+ tend to prefer this alias)
  3. Observe: tool summary shows 📖 Read with no file path
  4. Compare: using path parameter shows 📖 Read: from ~/path/to/file

Expected behavior

All 4 parameter aliases should produce the same verbose display with the file path shown.

Suggested fix

Add record.file to the candidates in resolvePathArg() and align handleToolExecutionStart() to check all 4 aliases. The detailKeys in tool-display.json could also be extended, though resolvePathArg() takes priority for Read/Write/Edit tools.

Environment

  • OpenClaw version: 2026.3.24
  • Model: Claude Opus 4 / Sonnet 4 (both reproduce)
  • Platform: Discord + Telegram

extent analysis

Fix Plan

To fix the issue, we need to update the following code:

1. src/agents/tool-display-common.tsresolvePathArg()

for (const candidate of [record.path, record.file_path, record.filePath, record.file]) {
    // ...
}

2. src/agents/pi-embedded-subscribe.handlers.tools.tshandleToolExecutionStart()

const filePathValue =
    typeof record.path === "string"
        ? record.path
        : typeof record.file_path === "string"
            ? record.file_path
            : typeof record.filePath === "string"
                ? record.filePath
                : typeof record.file === "string"
                    ? record.file
                    : "";

3. apps/shared/OpenClawKit/Sources/OpenClawKit/Resources/tool-display.json

"read": {
    "emoji": "📖",
    "title": "Read",
    "detailKeys": ["path", "file", "file_path", "filePath"]
}

Verification

To verify the fix, follow these steps:

  • Enable /verbose on
  • Trigger a Read tool call using the file parameter
  • Observe: tool summary should show 📖 Read: from ~/path/to/file
  • Compare: using other parameter aliases (path, file_path, filePath) should produce the same verbose display with the file path shown

Extra Tips

  • Make sure to test the fix with different models (e.g., Claude Opus 4, Sonnet 4) and platforms (e.g., Discord, Telegram) to ensure the issue is fully resolved.
  • Consider adding additional logging or debugging statements to help identify similar issues in the future.

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

All 4 parameter aliases should produce the same verbose display with the file path shown.

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 - ✅(Solved) Fix [Bug]: Tool display missing file path when model uses "file" parameter alias [4 pull requests, 1 participants]