[BUG] @ File Autocomplete Ignores `permissions.deny` Settings

Resolved 💬 3 comments Opened Oct 10, 2025 by brandrsn Closed Oct 13, 2025

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?

Description

When using the @ symbol to tag files in a conversation, the autocomplete dropdown shows thousands of files from directories that are explicitly denied in .claude/settings.json via permissions.deny configuration. This makes it extremely difficult to find the actual files I want to tag.

The autocomplete is showing files from:

  • node_modules/ directories
  • .trigger/ temp folders
  • .turbo/ build cache
  • .vercel/ deployment artifacts
  • supabase/.branches/ and supabase/.temp/ directories

Expected Behavior

Files and directories listed in permissions.deny should be excluded from the @ autocomplete file picker, just as they are excluded from Read and Glob tool operations.

Actual Behavior

The @ autocomplete shows ALL files in the project, including those explicitly denied in settings, making the autocomplete list unmanageably long (thousands of irrelevant files).

Environment

  • Claude Code Version: [INSERT YOUR VERSION]
  • OS: macOS (Darwin 24.6.0)
  • Project: Monorepo with multiple packages, each containing node_modules and temp folders

Configuration Attempted

1. .claude/settings.json with Read permissions only

{
  "permissions": {
    "deny": [
      "Read(**/node_modules/**)",
      "Read(**/.trigger/**)",
      "Read(**/.turbo/**)",
      "Read(**/.vercel/**)",
      "Read(./supabase/**)"
    ]
  }
}

Result: Files still appear in @ autocomplete

2. .claudeignore file

Created .claudeignore in project root:

node_modules/
.trigger/
.turbo/
.vercel/
packages/**/node_modules/
packages/**/.trigger/
supabase/

Result: Files still appear in @ autocomplete

3. Combined Read + Glob deny patterns

Updated .claude/settings.json with both Read and Glob denials:

{
  "permissions": {
    "deny": [
      "Read(**/node_modules/**)",
      "Read(**/.trigger/**)",
      "Read(**/.turbo/**)",
      "Read(**/.vercel/**)",
      "Read(./supabase/**)",
      "Glob(**/node_modules/**)",
      "Glob(**/.trigger/**)",
      "Glob(**/.turbo/**)",
      "Glob(**/.vercel/**)",
      "Glob(./supabase/**)"
    ]
  }
}

Result: Files still appear in @ autocomplete after restart

Impact

This issue severely impacts usability in large projects or monorepos where temp/build directories contain thousands of files. Users cannot efficiently use the @ file tagging feature because the autocomplete list is cluttered with irrelevant files.

Workaround

Currently no workaround available. Users must scroll through thousands of irrelevant files to find the files they want to tag.

Related

  • Documentation states that permissions.deny replaced the deprecated ignorePatterns configuration
  • The deny patterns DO work correctly for Read and Glob tool operations (confirmed working)
  • The issue is isolated to the @ autocomplete feature only

What Should Happen?

Pseudo Code for Expected Behavior

// When building @ autocomplete file list
function getAutocompleteFiles() {
  const allFiles = scanProjectFiles()
  const settings = loadSettings('.claude/settings.json')

  // Filter out denied paths
  const allowedFiles = allFiles.filter(file => {
    return !matchesAnyDenyPattern(file, settings.permissions.deny)
  })

  return allowedFiles
}

// Expected: @ autocomplete should respect deny patterns
// Actual: @ autocomplete shows all files regardless of deny patterns

Error Messages/Logs

Steps to Reproduce

Steps to Reproduce

  1. Create a project with node_modules/ or other large temporary directories
  2. Configure .claude/settings.json with permissions.deny for those directories
  3. Restart Claude Code
  4. In a conversation, type @ to trigger file autocomplete
  5. Observe that denied directories still appear in the autocomplete list

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.13

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Cursor

Additional Information

<img width="655" height="210" alt="Image" src="https://github.com/user-attachments/assets/e7a5e849-8f85-49a7-8b67-e684ca2f669c" />

In the image above, all files in .trigger and node_modules folders should not be present in autocomplete, as per my deny settings.

View original on GitHub ↗

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