@ symbols in Commands that dont resolve to files cause command failure #1499

Closed
opened 2026-02-16 17:31:16 -05:00 by yindo · 2 comments
Owner

Originally created by @Cluster444 on GitHub (Aug 26, 2025).

Looks like the command function will blindly try to map any @ ref into a file and push it straight to the read tool. This is problematic when combined with !shell commands or just random uses of an @ symbol will cause ENOENT failure at some point in the chat function.

One thought is to check if the path resolves to an actual path, before turning it into a file part.

Although it may also be a better idea to do file part matching before bash eval expansion so that bash commands are not subject to file inclusion.

Originally created by @Cluster444 on GitHub (Aug 26, 2025). Looks like the command function will blindly try to map any `@` ref into a file and push it straight to the read tool. This is problematic when combined with !shell commands or just random uses of an `@` symbol will cause ENOENT failure at some point in the chat function. One thought is to check if the path resolves to an actual path, before turning it into a file part. Although it may also be a better idea to do file part matching before bash eval expansion so that bash commands are not subject to file inclusion.
yindo closed this issue 2026-02-16 17:31:16 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Aug 26, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #2233: Similar command processing issues with shell command expansion not working properly in custom commands
  • #2231: Related ENOENT errors when commands fail to resolve files/directories correctly
  • #1330: File path resolution ENOENT errors with path handling issues

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Aug 26, 2025): This issue might be a duplicate of existing issues. Please check: - #2233: Similar command processing issues with shell command expansion not working properly in custom commands - #2231: Related ENOENT errors when commands fail to resolve files/directories correctly - #1330: File path resolution ENOENT errors with path handling issues Feel free to ignore if none of these address your specific case.
Author
Owner
@rekram1-node commented on GitHub (Aug 26, 2025): closing in favor of: - #2198 - #2231
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1499