[BUG/REGRESSION] @-completion no longer suggests gitignored files since v2.1.94

Resolved 💬 3 comments Opened Apr 8, 2026 by jowitte Closed Apr 8, 2026

Summary

Since v2.1.94, the @ file picker only suggests files that are tracked by Git. Files matched by .gitignore no longer appear in the completion list. Previously, all workspace files were suggested regardless of Git status.

Reproduction

  1. Create a workspace with a .gitignore that excludes most files (e.g. /* with selective ! exceptions).
  2. Type @ in a Claude Code prompt.
  3. Observe: only un-ignored files appear. Ignored files cannot be selected via @.

Expected

@-completion suggests all files in the workspace, independent of Git tracking status — or at minimum offers a setting to opt out of the gitignore filter.

Suspected cause

The v2.1.94 changelog entry "Fixed @ file completion paths in subdirectories, and improved fuzzy matching for @ file suggestions" appears to have tightened gitignore-respecting as a side effect.

Why this matters: knowledge-work use cases

Claude Code is increasingly used outside traditional code repositories — knowledge vaults, documentation sites, research notes — where Git is not the source of truth for "which files exist."

A common pattern: a large markdown knowledge base where only a small .claude/ config directory is Git-tracked, while the actual content is managed by a separate sync system to avoid two sync mechanisms fighting over the same files. Under the new behavior, @-completion only suggests files inside that small tracked directory — i.e. ~1% of the files the user actually wants to reference. This is a hard blocker.

Request

Add an opt-out for the gitignore filter in @-completion. Possible shapes:

  • settings.json: "fileDiscovery": { "respectGitignore": false } or "includeGitignored": true
  • A .claudeinclude whitelist that overrides .gitignore for Claude's file index
  • Env var: CLAUDE_CODE_IGNORE_GITIGNORE=1

The previous behavior was the right default for non-code workspaces. Please consider reverting or making it configurable.

Environment

  • Claude Code v2.1.94
  • Platform: macOS (Darwin 25.4.0)
  • Shell: zsh

Related (closed as completed, different scope): #2305, #5105

View original on GitHub ↗

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