[BUG] VSCode Extension Does Not Respect .gitignore_global When Linking Files With @

Resolved 💬 10 comments Opened Oct 27, 2025 by tyler-ball Closed Feb 5, 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?

When using the VSCode extension, trying to add files as context with @ looks up files that are in my .gitignore_global config:

<img width="662" height="404" alt="Image" src="https://github.com/user-attachments/assets/d537a953-23b8-4ad4-a6e4-4045f5648650" />

When I try the same in claude code in the terminal I do not get this issue (.gitignore_global is respected). This is in the same repo for both:

<img width="362" height="186" alt="Image" src="https://github.com/user-attachments/assets/72e4b1a5-d6ce-45bd-a010-f8c7e7ad809a" />

What Should Happen?

Claude should respect my .gitignore_global when adding files to the context with @ from both the terminal and VSCode extensions

Error Messages/Logs

Steps to Reproduce

  1. Create ~/.gitignore_global, add files to it, and set that as global with git config --global core.excludesFile ~/.gitignore_global
  2. Create files that are ignored (in my case it is files created by the local history extension)
  3. Start a chat with cmd+esc in VSCode, using the extension UI (not terminal UI)
  4. Add a file with @ and see that the extension suggests files that are gitignored

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.27 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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