Skip to content

[Bug]: Relative terminal links open the wrong file after cd #37145

Open

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 a Linux host, open a thread terminal in a project containing both package.json and sub/package.json, each with a name on its second line.
  2. Run cd sub and grep -nH name ./package.json in Bash.
  3. Hover and click ./package.json:2 in the output, with a host editor selected.

Expected behavior

The editor opens sub/package.json at the reported line, the file that produced the grep output.

Actual behavior

The editor opens the different existing package.json under the terminal launch directory. When only the shell-relative file exists, the link does not activate.

Impact

Minor bug or occasional failure. Deterministic with colliding paths; population incidence is unknown.

Version or commit

Reproduced on main at 5e0127ca834a8af5bf59d38fdf5261e014e46699.

Environment

Linux, Bash, web client, GNU grep. The hunt also reproduced this with a same-host paired environment; no native desktop, mobile, or cross-machine claim.

Logs or stack traces

Recording host editor: actual --goto <project>/package.json:2; expected --goto <project>/sub/package.json:2.

Screenshots, recordings, or supporting files

Relative grep output after cd

Workaround

Use absolute paths in terminal output.

Found by the Terminal Improvement Hunt with GPT 6.1 Sol; independently confirmed by Claude Opus 5.5 in a separate isolated app and worktree.

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