Skip to content

When including multiple directories, @'ing a directory seems to pull in directories that match in all included directories #8748

Closed as not planned

Description

@timothyfroehlich

What happened?

This prompt: Take a good look at @scripts/ and @buildLogic/dependency-analysis/ resulted in Gemini automatically loading 1115 files into context

Image

The majority of these files were built outputs. It reduced my context from 100% to 66%.

What did you expect to happen?

#1: @'ing a directory would give Gemini the list of files in that directory, instead of filling it's context with everything it could find.
#2: @'ing a directory would either only load the files from the main directory, or there would be a mechanism to specify which directory the files should be looked for in.

Client information

  • CLI Version: 0.7.0-nightly.20250918.2722473a
  • Git Commit: 2722473
  • Session ID: ca84ba0a-7dd2-4cd2-9bb5-c2437f9b5f7e
  • Operating System: darwin v24.7.0
  • Sandbox Environment: no sandbox
  • Model Version: auto
  • Memory Usage: 595.7 MB

Login information

API Key

Anything else we need to know?

Settings.json snippet:

    "includeDirectories": [
      "../../libs",
      "../../BugReport",
      "../../Calendar",
      "../../Dashcam",
      "../../Dialer",
      "../../DriverUI",
      "../../Media",
      "../../Messenger",
      "../../MultiDisplay",
      "../../Radio",
      "../../SensitiveAppLock",
      "../../tests",
      "../../../../../out/aaos-apps-gradle-build"
    ],
    "loadFromIncludeDirectories": true
  }
}

Activity

  1. added
    priority/p1Important and should be addressed in the near term.
    area/coreIssues related to User Interface, OS Support, Core Functionality
    and removed
    status/need-triageIssues that need to be triaged by the triage automation.
    on Sep 18, 2025
  2. gemini-cli commented on Sep 18, 2025

    @gemini-cli
    Contributor

    The user is reporting a bug where mentioning a directory with @ incorrectly pulls in files from all configured 'includeDirectories' that have a matching name, rather than just the specified one. This is a core file resolution issue that significantly degrades a key feature, making it a high priority.

  3. agmsb commented on Sep 19, 2025

    @agmsb
    Contributor

    Thanks for filing, we'll investigate this.

  4. added a commit that references this issue on Sep 20, 2025
    67e8a99
  5. gemini-cli commented on Dec 21, 2025

    @gemini-cli
    Contributor

    Hello! As part of our effort to keep our backlog manageable and focus on the most active issues, we are tidying up older reports.

    It looks like this issue hasn't been active for a while, so we are closing it for now. However, if you are still experiencing this bug on the latest stable build, please feel free to comment on this issue or create a new one with updated details.

    Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stalearea/coreIssues related to User Interface, OS Support, Core Functionality

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions