VS Code extension `@` file mention does not reliably refresh after additional files are created while chat is open

Open 💬 0 comments Opened Mar 16, 2026 by messmerr

What version of the IDE extension are you using?

openai.chatgpt-26.311.21342-win32-x64

What subscription do you have?

Plus

Which IDE are you using?

VS Code 1.110.0

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

The VS Code extension does not reliably refresh @ file mention results after new files are created while an extension chat is already open.

In my testing:

  • If I open an empty folder and create A.txt, @A can usually find it.
  • But if I then create another file like B.txt in the same already-open workspace/chat, @B often fails.
  • The failure mode is either:
  • no result, or
  • the UI keeps spinning / searching indefinitely.

In the same directory, Codex CLI can find the newly created file immediately, so the issue seems specific to the IDE extension's file indexing or cache refresh.

What steps can reproduce the bug?

  1. Open an empty folder in VS Code.
  2. In the same directory, start Codex CLI and keep it running.
  3. Open a Codex extension chat in VS Code and keep it open.
  4. Create a new file A.txt in the workspace.
  5. Type @A in the extension chat and confirm it can be found.
  6. Create another new file B.txt in the same workspace.
  7. In the same already-open extension chat, type @B.
  8. Observe that B.txt is often missing, or the extension keeps showing a loading/searching state.
  9. In the already-running CLI session, search for @B.
  10. Observe that the CLI can find B.txt immediately.

What is the expected behavior?

The extension should refresh its workspace file index after files are created, so newly added files should appear in @ suggestions without needing to reopen the chat or reload the window.

Additional information

  • This seems related to stale file indexing or cache refresh in the IDE extension.
  • The problem is easier to trigger when the chat is already open and additional files are created afterward.
  • CLI does not appear to have the same problem.

View original on GitHub ↗