Repository navigation
Description
Quality-of-life improvement. Agent responses usually end with a list of files. In the TUI those paths are plain text, so opening one means selecting it with the mouse, copying it, switching to an editor, pasting it, and finding the line by hand. Terminal mouse selection also varies between terminals, tmux, and SSH. The line and column are already in the response, so the information is there but not usable.
Existing demand
This is not a new idea. It has been asked repeatedly across the TUI and desktop UIs:
- [FEATURE]: Make local file paths clickable in terminal output #58242 Make local file paths clickable in terminal output (filed October 22, re-filed from [FEATURE]: Make local file paths clickable in terminal output #19005). The request calls it "a big quality-of-life win" and says "I hit this every time a task generates reports, charts, or docs and I want to open them to review."
- tui: local Markdown file links are sent to the HTTP-only browser opener #54816 tui: local Markdown file links are sent to the HTTP-only browser opener, with an open fix in fix(tui): open local file links with the OS handler #55769.
- [FEATURE]: TUI: click the file name on Edit/Write/ApplyPatch blocks to open it in the editor #48609 TUI: click the file name on Edit/Write/ApplyPatch blocks to open it in the editor.
- Desktop requests with the same intent: Desktop: make file paths in chat clickable (open in editor / reveal in Finder) #37891 (make file paths in chat clickable), desktop: path links skip directories and paths with spaces #55863 (path links skip directories and paths with spaces), desktop: clicking ~-prefixed path pill reports File not found, absolute path works #50390 (
~-prefixed paths report File not found), [FEATURE]: Map file types to external applications when opened from chat (like link handling) #47765 (map file types to external applications).
The common ask is the same: a path the agent printed should be actionable where it is printed, without copy and paste. This issue is about the TUI interaction. A combined implementation was proposed in #60048; it was closed as too large, with a request to agree on the interaction first and split the work. This issue is that agreement step.
What would help
A keyboard path from "the response says this file" to "the file is open at that line", without leaving the TUI, on Linux, macOS, and Windows.
Constraints
- Only existing paths should be actionable. Relative names that do not exist stay plain text. Explicitly rooted missing paths can be listed so the reader gets a clear does-not-exist message instead of silence.
- A path is never passed through a shell.
- Executable file types (
.exe,.bat,.cmd,.desktop,.app, and similar) are not launched by the OS handler by default.$VISUALor$EDITORcan still open them as text. - Markdown structure, fenced code, inline code, URLs, and prose should keep rendering as they do now.
- No global key takes over. The feature starts behind
/pathswith an optional keybinding that goes through the existing leader-key configuration. - Editors differ. The VS Code family accepts
--goto file:line:column, Sublime and Zed acceptfile:line:column, vim accepts+line, and terminal editors need the renderer to suspend.
Options considered
- Keyboard picker on
/paths. Number every path in the last completed response, type the number to open it, and extend the same surface with multi-select. No mouse support required. - Mouse clickable paths in the transcript, through OSC 8 links or mouse hit testing. Terminal support and tmux/SSH behavior vary, so this would be a separate effort. It could complement the picker later.
- One key that opens the first file. Too limited when a response touches several files, and ambiguous about which path is first.
Proposed direction
Option 1, split into five reviewable parts:
- Basic picker: scan the last completed response, number common path shapes, open one selection in
$VISUALor$EDITORat the line, fall back to the OS handler. - Multi-select:
m, numbers toggle,aselects up to 10,enteropens the selection. Group several files into one editor process when the editor accepts several targets. - More path shapes: Windows drive and UNC paths,
file://URLs with#L12C3, quoted paths with spaces, Markdown link targets, and inline code. - Tag styling: concealed tags with red selection dots, without adding a theme token. Links and inline code keep their own colors, and the transcript returns to normal when the picker closes.
- Storybook story for repeated manual checks.
The five parts are ready locally. Part 1 opens after this issue; each following part opens as its parent merges, so every PR has a clean diff against dev.
Worked example
The response ends with:
Updated out/report.md and src/app.ts:12. Notes are in ./docs/.
The reader runs /paths. The transcript shows numbered tags in red while the picker is open, and the picker bar appears:
Updated out/report.md 1 and src/app.ts:12 2. Notes are in ./docs/ 3.
● Paths 3 · type a number · esc close
Typing 2 opens src/app.ts in the editor at line 12. Pressing m turns the tags into selection dots, and then 1, 2, enter opens both files in one editor process when the editor accepts several targets, or one process per file otherwise.
For a missing rooted path, the number is still shown. Choosing it reports that the path does not exist instead of opening anything.
Questions for maintainers
- Is
/pathsthe right command name, and is<leader>fan acceptable default keybinding? - Is numbering inside the rendered response acceptable when the numbers are concealed with
~~...~~and shown in red only while the picker is open? - Should directories open in the file manager, or be listed without opening?
- Is a cap of 10 on multi-select reasonable?
- Is the five-part split the right review shape?


Activity
opencodejr commentedon Oct 29, 2026
Thanks for the detailed proposal and for splitting the work after #60048 was closed. To restate it: you're suggesting a keyboard
/pathspicker for the TUI. It would number the file paths in the last completed response and open the chosen ones in$VISUAL/$EDITORat the right line, or with the OS handler, and support multi-select. You're also asking maintainers to decide the interaction questions before the parts are reviewed.Maintainers will look at it and at your questions about the command name, keybinding, in-transcript numbering, directories, the multi-select cap and the five-part split. This doesn't commit to any particular direction.
Related issues, for context:
spaxe-dev commentedon Oct 29, 2026
Part one is ready for review: #60178. It adds
/pathsand thesession.file_linkskeybinding (<leader>f) with single-path opening, editor line and column support, and an existing-path check. CI is green, and the review bot's three earlier findings are fixed.The interaction questions from the issue are still open, and parts two to five depend on them:
/pathsthe right command name, and is<leader>fan acceptable default, or should it stay unbound?Parts two to five (multi-select, more path forms, tag styling, storybook story) are built and tested on top of part one locally. I will open them one at a time as each parent merges, or adjust them if the answers point another way.
spaxe-dev commentedon Nov 4, 2026
Bump after a week: part one is ready and green, #60178.
The interaction questions above are the only thing holding the direction. A quick preference on the command name and the
<leader>fdefault would be enough to unblock the follow-up parts. If the split shape is wrong, say so and I will reshape it.One housekeeping note: the branch base is now 342 commits behind
dev. I can rebase it before review or after the questions are answered, whichever you prefer.