Skip to content

Bug: File names with # char is not properly escaped when tagging it (ENOENT) #11790

Closed

Description

@eersnington

Description

filenames with # don't work when tagging. example tagging @file#name.txt just comes back /path/file cause # isn't escaped

Plugins

whatever the goat dillon mulroy has in his dotfiles

OpenCode version

v1.1.48

Steps to reproduce

Minimal repo:

echo "hello world" > "file#name.txt"

Then open opencode and tag @file#name.txt, and you should get a non found error cause the # char isn't properly escaped

Screenshot and/or share link

Image

Operating System

macos 26.1

Terminal

ghostty

Activity

  1. github-actions commented on Feb 2, 2026

    @github-actions
    Contributor

    This issue might be related to existing special character handling issues. Please check:

    The underlying issue may be related to how special characters (including #) are escaped in file paths when used with the @ tagging syntax.

    If this is a distinct issue from the Write tool problems, it should be addressed separately in the file tagging/parsing logic.

  2. saksham1341 commented on Feb 3, 2026

    @saksham1341

    Have tried a fix for this by updating lineRange parsing and ensuring URI encoding of the file url to handle special characters like #.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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