No reliable way to reveal a file (vs. open it) from Claude Code's output inside VS Code's integrated terminal
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
- Run Claude Code inside VS Code's integrated terminal (macOS).
- Have it output a code block containing
open -R "/absolute/path/to/some-file.md". - 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 -Rcommands reliably one-click actionable for a user working inside VS Code.