Incorrect File Path Resolution in Custom Command Execution

Resolved 💬 2 comments Opened Mar 31, 2025 by mrjoshuak Closed Nov 30, 2025

Bug Description
When running a custom command that tells claude to read a file the path it generates to read is incorrect. Perhaps the path is being calculated relative to the command directory not the project directory?

Call(Check for project notes and get repo info)…
⎿  Read(file_path: "../../../../../.project_meta/notes.md")…

The identified path in the custom instruction is .project_meta/notes.md and when I directly prompt "Read .project_meta/notes.md" (with or without back ticks) I get the correct behavior.

Environment Info

  • Platform: macos
  • Terminal: iTerm.app
  • Version: 0.2.56
  • Feedback ID: 5b23ba5b-c062-4ee0-ae53-0d171132993c

Errors

[{"error":"Error: Tool error\n    at Object.call (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3674:3994)\n    at call.next (<anonymous>)\n    at ub5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3278:5687)\n    at ub5.next (<anonymous>)\n    at X31 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3278:4261)\n    at X31.next (<anonymous>)\n    at G (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1151:294)\n    at bU2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1151:561)\n    at async jb5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3278:3608)\n    at async GL1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3278:3439)","timestamp":"2025-03-31T05:25:01.186Z"}]

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗