Codex CLI: File suggestion bug (“no matches”) @meantianing

Resolved 💬 13 comments Opened Sep 11, 2025 by looper200 Closed Feb 19, 2026
💡 Likely answer: A maintainer (fcoury, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

codex-cli 0.34.0

Which model were you using?

gpt-5

What platform is your computer?

Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 unknown

What steps can reproduce the bug?

using @filename the file

<img width="1042" height="862" alt="Image" src="https://github.com/user-attachments/assets/c96161d3-dcc2-4ced-8495-5718e154d1eb" />

The file is there and can't suggest it also
.codexignore files:

dataset/
__pycache__/
onechar/
test.ipynb
*.pth
*.ckpt
*.ipynb
events.out*

.gitignore

dataset/
__pycache__/
logs/
onechar/
test.ipynb
*.pth
*.ckpt
*.ipynb
events.out*

What is the expected behavior?

It should suggest files. I only see this bug in recent releases.

What do you see instead?

_No response_

Additional information

_No response_

View original on GitHub ↗

13 Comments

duarteocarmo · 10 months ago

Exactly the same for me!

<img width="897" height="790" alt="Image" src="https://github.com/user-attachments/assets/9444a349-cdcc-4b5d-9e43-b73041505c91" />

seIIers · 10 months ago

Also running into this bug on WSL2 (Ubuntu 24.04)

looper200 · 10 months ago

I hope they fix that soon

Lee-Ju-Yeong · 10 months ago

window11 too

aminroosta · 10 months ago

This should be fixed in https://github.com/openai/codex/pull/3783, I'm using the cli, so feel free to build from source.

duarteocarmo · 10 months ago

Thanks @aminroosta! - let's see if it gets merged. Annoying...!

seIIers · 9 months ago

Hope this gets merged soon!

evanheckert · 7 months ago

Still experiencing this on v0.66.0 on MacOS 26.2, attempted in Warp Terminal, Terminal.app, Ghostty

Edit: Same on v0.71.0
Edit: Same on v0.72.0
Edit: Same on v0.75.0
Edit: Same on v0.77.0
Edit: Same on v0.79.0. claude is working fine.
Edit: Same on v0.80.0
Edit: Same on v0.86.0

› !ls

• You ran ls
  └ AGENTS.md
    CLAUDE.md
    Makefile
    QUICK_START.md
    README-CLOUD-AGENT.md
    README-DEVELOPMENT.md
    README-PRODUCTION.md
    README-STAGING.md
    README-TROUBLESHOOTING.md
    README.md
    assets
    biome.json
    docker
    docker-compose.dev.yml
    docker-compose.perf.yml
    docker-compose.prod.yml
    docker-compose.staging.yml
    docker-compose.yml
    docs
    logs
    node_modules
    package.json
    plan
    scripts
    server
    sync_db.sh
    tools.yaml
    ui

 
› @READ
 
  no matches

Interestingly, the only two files it sees are:

› @.
 
  .env.example
  .gitignore
› @e
 
  .env.example
  .gitignore
vforsh · 6 months ago

Same on codex-cli 0.77.0 (macos 15.5 (24F74), Ghostty 1.2.3)

In my case the only two files it sees are:

  • .gitignore
  • README.md
fcoury contributor · 5 months ago

@vforsh @evanheckert @CSRessel and others in this thread: can you check if you can still reproduce this behavior on the current version?

I suspect this was fixed by https://github.com/openai/codex/pull/9279

evanheckert · 5 months ago

@fcoury symptoms are almost the same on 0.104.0. The one change is that the two files it will now show are:

  .gitignore
  .vscode/settings.json

So strangely the only thing that changed is that it does see .vscode/settings.json now but no longer sees .env.example.

❯ tree -L 2 -d
.
├── changelog
├── docker
├── docs
│   ├── development
│   ├── dispatch
│   ├── executive-kpi-dashboard
│   └── server
├── logs
├── node_modules
├── plan
│   ├── prompts
│   └── tanstack-router
├── scripts
│   └── git-hooks
├── server
│   ├── __pycache__
│   ├── accounting
│   ├── admin_server.egg-info
│   ├── common
│   ├── customers
│   ├── data
│   ├── dispatch
│   ├── infra
│   ├── log_files
│   ├── materials
│   ├── media
│   ├── notifications
│   ├── people
│   ├── projects
│   ├── static
│   ├── staticfiles
│   ├── templates
│   └── thermal_admin
└── ui
    ├── dist
    ├── e2e
    ├── node_modules
    ├── playwright-report
    ├── public
    ├── src
    └── test-results
fcoury contributor · 5 months ago
@fcoury symptoms are _almost_ the same on 0.104.0. The one change is that the two files it will now show are:

@evanheckert I tried replicating issue issue for some time but unfortunately, I wasn’t able to.

To help us get to the bottom of this, I asked Codex to help me create this checklist. If you have the time would you mind providing me the responses for the items below? I appreciate it!

  1. Codex build + surface
- codex --version - Are they using CLI TUI, VS Code extension, or Codex App?

I mostly have these, just confirm CLI and v0.104.0.

  1. Exact working directory
  • pwd
  • Is that folder a git repo (git rev-parse --is-inside-work-tree)?
  1. Minimal tree + ignore files
  • tree -a -L 4 (or equivalent)
  • Contents of relevant ignore files:
  • repo .gitignore
  • nested .gitignore files
  • any parent .gitignore above repo
  • global excludes (git config --get core.excludesfile + file contents)
  1. One file that fails + one that works
  • Path you expect to find via @...
  • Path that does appear
  1. Ground truth from gitignore engine
  • git check-ignore -v <failing-path>
  • git check-ignore -v <working-path>
  1. How mention is invoked
  • What exact token you typed (@docs, @foo/bar, etc.)
  • Whether manual typed path works even when picker doesn’t (meaning ask Codex to read @[file-that-doesnt-work] and see if it can find it)
  1. Any symlink/nonstandard root details
  • Is repo under symlinked path?
  • Is there a monorepo/worktree/submodule involved?
evanheckert · 4 months ago

@fcoury Heh, we found it. I'll include my whole reply for context, but solution is at the bottom.

1. Codex build + surface

- codex --version
❯ codex --version
codex-cli 0.106.0
- Are they using CLI TUI, VS Code extension, or Codex App?

Both CLI and Codex.app v 26.227.1448 (747). The Codex app also has the issue.

[insert image of app]

2. Exact working directory

mono on  main via 🐳 orbstack via  v24.13.1
❯ pwd
/Users/evanheckert/git/thermal/mono

mono on  main via 🐳 orbstack via  v24.13.1
❯ git rev-parse --is-inside-work-tree
true

3. Minimal tree + ignore files

  • tree -a -L 4 (or equivalent)

(snipping this since not the root cause)
1679 directories, 5885 files


-   Contents of relevant ignore files:
    -   repo `.gitignore`
```./.gitignore
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
# Environment variables and secrets
.env
.env.*
!.env.example

# Sentry Config File
.env.sentry-build-plugin

# Django #
*.log
*.pot
*.pyc
__pycache__
db.sqlite3
media

# Backup files #
*.bak

# If you are using PyCharm #
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# File-based project format
*.iws

# IntelliJ
out/

# JIRA plugin
atlassian-ide-plugin.xml

# Python #
*.py[cod]
*$py.class

# Distribution / packaging
.Python build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
# lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
.pytest_cache/
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery
celerybeat-schedule.*

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# mkdocs documentation
/site

# mypy
.mypy_cache/

# Sublime Text #
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
*.sublime-workspace
*.sublime-project

# sftp configuration file
sftp-config.json

# Package control specific files Package
Control.last-run
Control.ca-list
Control.ca-bundle
Control.system-ca-bundle
GitHub.sublime-settings

# Visual Studio Code #
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history

log_files
log_files/**
*.DS_Store
static/*

*.xlsx
*.csv
*.sql
*.sh
!scripts/with-env.sh
!scripts/sync_db.sh
!scripts/git-hooks/
!scripts/git-hooks/*.sh

**/.claude/settings.local.json

# Cursor Background Agent secrets
.cursor/environment.local.json
.env.*
.*.env
ui/.pnpm-store/
ui/.pnpm-store/**
ui/.pnpm-store
*.dump
  • nested .gitignore files

```ui/.gitignore

Logs

logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

Editor directories and files

.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
.ntvs
*.njsproj
*.sln
*.sw?
.env
!e2e/.env.example

Sentry Config File

.env.sentry-build-plugin

Playwright / E2E artifacts

playwright-report
test-results
e2e/.auth

```server/.gitignore
# Django #
*.log
*.pot
*.pyc
__pycache__
db.sqlite3
media

# Backup files #
*.bak

# If you are using PyCharm #
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# File-based project format
*.iws

# IntelliJ
out/

# JIRA plugin
atlassian-ide-plugin.xml

# Python #
*.py[cod]
*$py.class

# Distribution / packaging
.Python build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
.pytest_cache/
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery
celerybeat-schedule.*

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# mkdocs documentation
/site

# mypy
.mypy_cache/

# Sublime Text #
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
*.sublime-workspace
*.sublime-project

# sftp configuration file
sftp-config.json

# Package control specific files Package
Control.last-run
Control.ca-list
Control.ca-bundle
Control.system-ca-bundle
GitHub.sublime-settings

# Visual Studio Code #
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history

log_files
log_files/**
*.DS_Store
static/*

*.xlsx
*.csv
*.sql
*.sh
  • any parent .gitignore above repo <-- holy smokes we might have a winner

```~/.gitignore
*
!.gitignore
!.gitconfig
!.bash_history
!.npmrc
!.zshrc
!.zshenv
!.vscode
!.vscode/settings.json
!.claude/settings.json
!.config
!.config/karabiner
!.config/karabiner/karabiner.json
!.cursor
!.cursor/mcp.json
!.cursor/cli-config.json
!.codex
!.codex/config.toml
!.zprofile
!.profile
!.tmux.conf
.cursor/ide_state.json

    -   global excludes (`git config --get core.excludesfile` + file contents)
```sh
mono on  main [?] via 🐳 orbstack via  v24.13.1
❯ git config --get core.excludesfile
 

4. One file that fails + one that works

```.sh

› @g

.gitignore
.vscode/settings.json

```.sh

› @package.json

  no matches

5. Ground truth from gitignore engine

  • git check-ignore -v <failing-path>
  • git check-ignore -v <working-path>

```.sh
mono on  main via 🐳 orbstack via  v24.13.1
❯ git check-ignore -v .vscode/settings.json

mono on  main via 🐳 orbstack via  v24.13.1
❯ git check-ignore -v ui/package.json


### 6.  How mention is invoked

-   What exact token you typed ([@docs](https://github.com/docs), @foo/bar, etc.)
Just the normal `@substring` with `left-shift+2` as the first character.

-   Whether manual typed path works even when picker doesn’t (meaning ask Codex to read @\[file-that-doesnt-work\] and see if it can find it)
**Yes, both the CLI and Codex.app can see/work on everything you'd expect them to.**

### 7.  Any symlink/nonstandard root details

-   Is repo under symlinked path?
**No.**
-   Is there a monorepo/worktree/submodule involved?
Per your question about a .gitignore in a parent folder - my ~/.gitignore is there due to a repo in my user folder for all of the user config files I want backed up. 

*SON OF A...*

**Yep, I comment out that `~/.gitignore` and it all works.**

So is that a bug or am I just being dumb in how I'm doing the user root config repo?