Skip to content

[Bug]: edit tool reports "File not found" for existing files #30335

@kikiautre

Description

@kikiautre

Summary

The edit tool reports “File not found” for files that clearly exist and are accessible via other tools (exec, read, write).

This appears to be either:
• incorrect path resolution inside the edit tool, or
• a misleading error message when accessing files outside the workspace root.

Steps to reproduce

  1. Attempt to use the edit tool on a file outside the workspace root
  2. Example: edit(path="~/.npm-global/lib/node_modules/openclaw/skills/gog/SKILL.md")
  3. Tool returns error: "File not found"

Expected behavior

Either:
• The file is successfully edited (since it exists and is accessible), OR
• A clear and accurate error is returned (e.g., “Access denied” or “Outside workspace not allowed”).

Actual behavior

• Error returned: “File not found”
• The file exists at that exact path (verified with ls)
• exec, read, and write tools can access and modify the same file
• Only edit reports failure

OpenClaw version

2026.2.26

Operating system

Linux (Ubuntu)

Install method

Node: v22.22.0

Logs, screenshots, and evidence

[tools] edit failed: File not found: ~/.npm-global/lib/node_modules/openclaw/skills/gog/SKILL.md

Impact and severity

No response

Additional information

• The path is absolute
• The file exists
• Permissions are correct
• Other tools confirm accessibility
• This may indicate sandbox path filtering inside edit, incorrect internal path normalization, or misleading error reporting

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions