[BUG][VSCode] @ file mention picker does not play well with .gitignore

Resolved 💬 3 comments Opened Mar 11, 2026 by HristoBuyukliev Closed Mar 13, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

The VSCode extension's gitignore parser incorrectly handles two common gitignore patterns, causing all Python files to be hidden from the @ file mention picker:

.py[cod] — should match .pyc, .pyo, .pyd only, but the parser appears to treat it as matching .py*
.py,cover — should match .py,cover files only (pytest coverage artifacts), but the parser appears to treat the comma as a delimiter and matches .py
Both patterns are part of GitHub's default Python .gitignore template, so this likely affects many Python projects.

What Should Happen?

Should only ignore .pyc, pyd, pyo files; actually ignores all .py files.

Error Messages/Logs

None

Steps to Reproduce

  1. Open a Python project in VSCode with Claude Code extension
  2. Ensure .gitignore contains .py[cod] and/or .py,cover (standard Python gitignore entries)
  3. Enable "Respect .gitignore" in Claude Code settings
  4. Type @ in the chat input and search for any .py file
  5. No .py files appear in results

Expected: Only .pyc/.pyo/.pyd/.py,cover files are excluded.

Actual: All .py files are excluded.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.73 - VSCode extension

Platform

Other

Operating System

Windows

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗