No reliable way to reveal a file (vs. open it) from Claude Code's output inside VS Code's integrated terminal

Status Open
Maintainer reply None cached
Activity 0 comments · opened Sep 4, 2026

Description

When Claude Code prints a shell command containing an absolute file path (e.g. open -R "/path/to/file.md" on macOS, to reveal a file in Finder instead of opening it), and the user Cmd/Ctrl-clicks that path inside VS Code's integrated terminal, VS Code's own terminal link detection intercepts the click and opens the file directly in the editor — the shell command itself is never executed, regardless of what it says.

Net effect: there is no reliable one-click way to get "reveal in Finder/Explorer" behavior from Claude Code's output when running inside VS Code's integrated terminal, even when the printed command explicitly requests it.

Steps to reproduce

  1. Run Claude Code inside VS Code's integrated terminal (macOS).
  2. Have it output a code block containing open -R "/absolute/path/to/some-file.md".
  3. Cmd-click the file path text (instead of pasting/running the line).

Expected

Either the command actually executes on click, or there's some supported way (setting, alternate modifier, or a dedicated action in the Claude Code VS Code extension) to choose "reveal in file manager" instead of "open in editor" for a path Claude Code outputs.

Actual

The file always opens in the VS Code editor — the surrounding shell command is ignored, because VS Code's terminal link provider treats any detected absolute path as an "open in editor" link before the line can be executed as a command.

Context

  • Confirmed the command itself works correctly when actually executed (not clicked) — e.g. run directly via Claude Code's own Bash tool.
  • iTerm2 solves the equivalent problem for its own terminal via a "Semantic History" setting (user-configurable action per clicked path, including running an arbitrary command like open -R \1). VS Code's integrated terminal has no equivalent setting, and Claude Code's VS Code integration doesn't currently offer an alternative.
  • This came up trying to make file paths in Claude Code's suggested open/open -R commands reliably one-click actionable for a user working inside VS Code.

View original on GitHub ↗