Repository navigation
Description
Summary
Codex should support shell-like path autocomplete directly in the composer when the user types path-shaped tokens such as:
/...~/...../..../...
This should feel like a first-class terminal/editor affordance, not something limited to @ file mentions.
Problem
There are already path-adjacent behaviors in Codex, but they feel fragmented:
@filename/ file mention autocomplete exists in some form- there is a request for
~and absolute-path support in@mentions (Support absolute paths and~expansion in@file mentions/fuzzy search #11996) Tabcurrently collides with prompt queueing/path completion semantics (Accidental prompts using the Tab key #12939)
What still seems missing is one coherent composer-level behavior:
If the user is literally typing a path in the message body, Codex should help complete it.
Today that shell reflex is broken or at least not clearly supported in a consistent way.
Requested behavior
When the caret is inside a path-like token in the composer, Codex should offer path completion.
Examples:
- typing
~/Docshould suggest~/Documents/... - typing
/home/alshould suggest matching filesystem paths - typing
../src/omshould suggest matching relative paths - typing
./references/should enumerate entries under that directory
This should work for common path forms:
- absolute paths
~home-relative paths- relative paths
- dot-segment paths
UX notes
- the completion surface should feel shell-like and low-friction
- path normalization / tilde expansion should be predictable
- directory completions should clearly distinguish files vs directories
- completion should not be restricted to
@mentions if the user is plainly typing a path inline
Tab / keybinding behavior
This likely needs to be designed together with #12939.
If Tab is used for path completion, it should not accidentally queue/send prompts.
Possible solutions:
- use
Tabfor completion when the caret is inside a path-like token - otherwise preserve the existing queue behavior
- or make the binding configurable / mode-aware
Why this matters
This is basic terminal/editor parity.
Users constantly type paths from shell habit. When Codex lives in a terminal and yet does not meet that reflex cleanly, the product feels behind obvious expectations.
The terminal composer should feel like a place where file paths are native objects.
Related issues
@filenameautocomplete bug: @filename autocomplete not working #11079- absolute paths and
~in@mentions: Support absolute paths and~expansion in@file mentions/fuzzy search #11996 Tabcollision / accidental prompts: Accidental prompts using the Tab key #12939
Invitation
Would be good to discuss:
- whether this should share one backend with
@mention completion - what the right completion UI is when both file mentions and plain inline paths are possible
- how
Tab/Shift+Tab/ alternate completion keys should behave
Activity
oxysoft commentedon Mar 14, 2026
Related tracker context:
@filenameautocomplete bug: @filename autocomplete not working #11079~in@mentions: Support absolute paths and~expansion in@file mentions/fuzzy search #11996Tabcollision / accidental prompt queueing: Accidental prompts using the Tab key #12939Those issues cover nearby fragments. This issue is the broader composer-level ask: shell-like path completion for inline path-shaped tokens such as
/...,~/...,../..., and./..., not just@mention flows.github-actions commentedon Mar 14, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
parasyte commentedon Mar 14, 2026
The heuristic for this feature request is incomplete. If I start typing
src/, it would be a path that does not match the proposed patterns. The@prefix is an inexpensive alternative to heuristic logic that doesn't have false negatives, and false positives are trivially dismissed.On the UX of tab completing paths, the problem I have with the existing implementation is not the
@prefix, it's that tab only selects whatever path is currently highlighted in the selector! Shell path completion does incremental segment-based completion. And that's very important for deep and wide directory structures. Scrolling a selection menu dozens of times trying to find exactly the right file is tedious. Typing out a multi-segment prefix just to filter the selection box down enough that the tab key becomes useful is also annoying.A nice-to-have in this area is fuzzy search matched by Levenshtein or Jaro-Winkler distance to gracefully handle typos and transpositions. But I can do without it if completion is improved.
are-scenic commentedon May 8, 2026
I’m hitting a related
@mention workflow issue.When typing
@and selecting a directory from the completion menu, pressingEnterorTabaccepts the directory but exits/hides the@mention mode. That makes it awkward to keep building a deeper path.Example workflow:
@DocDocuments/TaborEnterDocuments/ObsidianVault/...is not convenientThe workaround is to move back to the beginning of the partial path and add
@again so Codex treats the path as an indexed file reference.Expected behavior: accepting a directory completion should keep mention/path-completion mode active, probably inserting a trailing
/and showing entries inside that directory. This would make@file references usable for deep paths without repeatedly restarting mention mode.Timothy-W-Hilton commentedon May 20, 2026
I think the core issue here is that completion is not iterative.
Current behavior:
@TabAt that point:
@disappearsThis makes descending a directory tree awkward because continuing completion requires:
@In practice, reaching a deep path can require several rounds of this.
What I expected instead was normal shell/editor-style path completion semantics:
Tabcontinues completion deeper into the treeFor example, after completing:
@src/componentsI would expect to be able to continue with:
/butand immediately continue tab-completing from there, without restarting completion from the beginning of the path.
skytwosea commentedon May 28, 2026
@Timothy-W-Hilton This is the core issue for me as well.
When navigating through nested directories, the tab behaviour should, at minimum:
tabto append it to the @ file mention, and present that directory's contents as tab-completable so one can keep building out the filepathenterto append it to the @ file mention, and exit the file navigatortaborenterto append it to the @ file mention, and exit the file navigator@parasyte mentions fuzzy matching - that would be a blessed add-on as well.
This seems so basic at first blush. The current implementation feels like trying to drive a car with a floppy, loose chain for a steering-wheel. Tabbing one's way through filepath completion is pretty basic stuff for anyone used to working in a shell - it's not some novel feature to present as an extra nicety, it's basic ingrained-habit necessity.
edit: I'm probably quite late in learning this, but there is a workflow behaviour that allows for filepath building. Consider the following filepath:
If one types a part of each word and then a forward slash, the navigator keeps building forward. So, for the following prompt, one can type the following:
and then the file navigator will highlight the target file
04A_long_complex_phase_with_desc.md(assuming one has typed enough to uniquely identify it). Then,taborenterselects it which fully expands the completed (relative) path in the prompt.It's ugly, but it works.
I still would like to request sensible tab behaviour in filepath navigation/completion.
bpawlakj commentedon Oct 1, 2026
Adding user-reported feedback supporting this feature request: directory navigation and path autocomplete outside the current workspace in the CLI composer.
Component: Codex CLI
Installed CLI version: 0.159.3
Platform: macOS
Problem
When working across related repositories, I want to select a sibling or parent directory directly from the active CLI session. The user reports that the composer autocomplete does not provide an interactive way to browse directories above the current project or complete paths to sibling repositories. Manually typing or pasting paths makes this workflow cumbersome.
Example workflow
Requested behavior, supporting this issue and related issue #11996
Why this matters
This would make cross-repository work easier without leaving the session or manually copying filesystem paths. The user reports being accustomed to this workflow in Claude Code and GitHub Copilot CLI.
Current workaround
Manually provide a path in the prompt, or restart/resume with --add-dir when additional write access is needed. Neither provides interactive directory navigation in the composer.
Evidence scope
This is user-reported usability feedback, not an independently reproduced automated test. No private repository details, logs, screenshots, or session transcript are included.