Bug: @ file picker surfaces .git refs/logs entries

Open 💬 3 comments Opened Mar 3, 2026 by jimmyn

Problem

@ file picker suggestions include Git internal reference/log files (for example .git/refs/... and .git/logs/refs/...).

This is confusing because the picker is expected to show project files intended for code context, not VCS internals.

Environment

  • Codex Desktop: 26.228.1430 (760)
  • Codex CLI: 0.106.0
  • OS: macOS 26.3 (25D125)
  • Architecture: arm64

Reproduction

  1. Open Codex in any Git repository that has local or remote branches.
  2. In the prompt input, type @ followed by a partial term matching a branch-like token (for example a feature name segment).
  3. Observe suggestions/results.

Actual Behavior

Suggestions include entries under:

  • .git/refs/...
  • .git/logs/refs/...

Expected Behavior

@ file picker should exclude Git internals and only show relevant workspace files.

Action Plan

  • [ ] Confirm whether file picker is bypassing ignore rules for hidden/VCS directories.
  • [ ] Ensure .git/** is excluded across CLI, desktop app, and extension for consistent behavior.
  • [ ] Add regression tests for @ completion/search with repositories containing refs/logs.

Acceptance Criteria

  • [ ] @ suggestions never include .git/** entries.
  • [ ] Project files remain searchable as before.
  • [ ] Behavior is consistent across Codex surfaces.

View original on GitHub ↗

3 Comments

jimmyn · 5 months ago

Additional confirmation: reproducible in Codex CLI as well.

Environment:

  • Codex CLI: 0.106.0

Observed behavior in CLI @ suggestions:

  • .git/refs/heads/...
  • .git/logs/refs/heads/...
  • .git/filter-repo/...

Example repro in CLI:

  1. Open any Git repository with multiple branches.
  2. Type @utils (or another token matching branch/file-like text).
  3. Suggestions include .git/** entries instead of only workspace source files.
doublemover · 5 months ago

Still an issue in 0.110.0, in the TUI, and has been an issue for a long time now. I've stopped using this feature entirely because of it

<img width="108" height="128" alt="Image" src="https://github.com/user-attachments/assets/3630b6b2-6199-409a-afdd-189ee2167eea" />

E: Does not seem to respect .gitignore, .rgignore, etc, it used to do this at some point

esadakcam · 1 month ago

I have the same issue on codex-cli 0.145.0

<img width="745" height="325" alt="Image" src="https://github.com/user-attachments/assets/160f41c0-5511-4f2c-9cbf-d520d08efc76" />