Skip to content

Code indexer cannot access generated code and nested repositories due to strict .gitignore enforcement #7877

@mrawji

Description

@mrawji

What specific problem does this solve?

What specific problem does this solve?

The code indexer currently respects .gitignore patterns with no override mechanism, preventing Code Indexer from accessing code that developers intentionally exclude from version control but still need for development context.

Who is affected:

Developers using workflows that have:

  • Generated code (TypeScript definitions, API clients, build artifacts)
  • Meta-repository patterns with nested repositories
  • Monorepos with selective version control
  • Projects with substantial generated documentation or configuration

Current vs Expected Behavior:

Current: Code indexer skips ALL files matching .gitignore patterns, regardless of their value for AI context

Expected: Developers can specify inclusion patterns that override .gitignore for indexing purposes only (without affecting Git behavior)

Example Impact

  • A meta-repository with subprojects/*/src/** gitignored at root level - AI can't assist with nested project development
  • OpenAPI-generated client code in generated/api/ - AI lacks understanding of available API methods and types

This would significantly improve AI assistance quality for real-world development workflows while maintaining clean version control practices.

Workaround

  • update .gitignore to ignore subprojects/*/generated/* and tolerate the dirty git directory.

Additional context (optional)

No response

Roo Code Task Links (Optional)

No response

Request checklist

  • I've searched existing Issues and Discussions for duplicates
  • This describes a specific problem with clear impact and context

Interested in implementing this?

  • Yes, I'd like to help implement this feature

Implementation requirements

  • I understand this needs approval before implementation begins

How should this be solved? (REQUIRED if contributing, optional otherwise)

No response

How will we know it works? (Acceptance Criteria - REQUIRED if contributing, optional otherwise)

No response

Technical considerations (REQUIRED if contributing, optional otherwise)

No response

Trade-offs and risks (REQUIRED if contributing, optional otherwise)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue - Needs ScopingValid, but needs effort estimate or design input before work can start.enhancementNew feature or requestproposal

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions