Skip to content

[Bug]: Terminal file URI links lose literal numeric filename suffixes #37200

Closed

Description

@StiensWout

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. On Linux, create files named report.txt, report.txt:12-64, and report.txt:0 with different contents.
  2. In T3 Code's terminal, emit a hostless OSC8 file link to the suffixed filename. For example, GNU ls can produce it:
    ls -d --hyperlink=always --color=never -1 --quoting-style=literal -- 'report.txt:12-64' | sed -E 's@file://[^/]+/@file:///@'
  3. Ctrl+click the link with a VS Code-family editor configured.
  4. Repeat with report.txt:0. Also try the suffixed file alone, without neighboring unsuffixed files.

Expected behavior

An explicit file URI names the exact filename. Numeric suffixes in its pathname remain part of that filename. A separate hash fragment may supply a position.

Actual behavior

The range filename targets report.txt at line 12; the zero suffix is discarded. With no neighboring file, activation can be declined because metadata queries the wrong filename.

Impact

Minor bug or occasional failure. Legal POSIX filenames with numeric colon suffixes can silently open a different file.

Version or commit

Reproduced on main 1b14aade4de1db0c82b8d61ccfd9c011b04c3810. Independently confirmed earlier on 2b83dd0969f40be89311ad5394da49a4d951ac6e by Claude Opus 5.5.

Environment

Linux web client, real terminal, filesystem metadata, and editor argument capture. No editor UI, native, Windows, or remote runtime claim.

Logs or stack traces

The existing terminal resolver test and committed scenario reproduce the bug. The scenario fails on base and passes on the fix. Proof and captures.

Related closed issue #36005 addressed cwd resolution, rather than literal numeric filename suffixes.

Workaround

Open the exact filename directly rather than activating its terminal link.

Activity

  1. added
    vouch:trusted
    on Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    vouch:trusted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions