codex - 💡(How to fix) Fix TUI: support zsh-style directory traversal for @ file mention completion [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#21415Fetched 2026-05-07 03:40:24
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×3unlabeled ×1

Code Example

@src<Tab>        -> @src/
@src/components<Tab> -> @src/components/
RAW_BUFFERClick to expand / collapse

Feature request

In the Codex CLI TUI, @ file mention completion currently accepts the highlighted candidate as a complete mention when pressing Tab/Enter. For directory candidates, it would be useful if Tab could accept the highlighted directory segment as a prefix and keep completion active, similar to path completion in zsh.

Current behavior

  1. Type an @ file mention prefix, for example @src.
  2. The completion UI highlights a matching directory, for example src.
  3. Press Tab.
  4. Codex inserts/accepts the highlighted item as the final mention, so continuing into subfolders requires typing more of the path before accepting or manually editing afterward.

Desired behavior

For directory candidates, pressing Tab should be able to accept the highlighted directory as a path prefix, insert a trailing slash, and keep file completion open:

@src<Tab>        -> @src/
@src/components<Tab> -> @src/components/

This would make @ file mentions behave more like zsh path completion, where repeated tabbing/typing can progressively traverse directories before selecting the final file or folder.

Why this helps

In large repositories, users often know the top-level directory first, then narrow down interactively. The current accept-as-final behavior makes @ mentions slower than normal shell path completion for nested files.

Environment

  • Codex CLI: codex-cli 0.128.0
  • Shell: /bin/zsh
  • Terminal: screen-256color
  • Platform: Linux x86_64

Related

This is related to, but distinct from, #6915. That issue covers other @ completion convenience/bug behavior; this request is specifically for zsh-style incremental directory traversal while composing @ file mentions.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix TUI: support zsh-style directory traversal for @ file mention completion [1 participants]