﻿# JetBrains Codebase Mode: automatic discovery and manual evidence

Automatic discovery and manual selection are complementary context paths; compare the actual evidence and preserve explicit file-exclusion and attachment semantics.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/learn-jetbrains-codebase-manual-context/
Language: en

JetBrains Codebase Mode automatically gathers relevant project context, while manual attachments let the user select evidence directly. Disabling automatic collection changes how material is discovered; it does not eliminate the need for sufficient context. Understanding the two paths helps diagnose irrelevant retrieval, missing definitions, and assumptions about which excluded files can appear in a request.

## Automatic discovery chooses candidates for a question

The assistant can gather material it considers relevant to the request. This is helpful when the user does not know the implementation location, but relevance is still a selection process with possible misses. A broad question can produce broad evidence. Give observable identifiers, error text, or a concrete behavior to guide discovery. Then inspect which sources support the answer rather than assuming the automatic mode established complete knowledge of the entire project.

Primary reference: [JetBrains AI Assistant: Chat with AI](https://www.jetbrains.com/help/ai-assistant/chat-mode.html).

## Manual mode makes selection more explicit

When automatic codebase gathering is disabled, the user can add relevant files, symbols, or other supported attachments. This can make a narrow investigation easier to review. It also places more responsibility on selecting the dependencies needed by the question. An isolated method can omit configuration or a caller that determines its behavior. Start with the smallest sufficient evidence and allow a focused follow-up when the explanation exposes a missing contract.

Primary reference: [JetBrains AI Assistant: AI Chat](https://www.jetbrains.com/help/ai-assistant/ai-chat.html).

## Exclusions govern automatic gathering

Current JetBrains documentation states that Codebase Mode does not gather context from files listed in the relevant ignore mechanisms. Manual attachment has separately documented behavior and can provide material intentionally selected by the user. These paths should not be conflated into a universal filesystem denial. Review the exact feature and configured agent when evaluating access. A precise explanation names automatic selection, explicit attachment, and any other tool route separately rather than claiming one ignore file governs everything.

Primary reference: [JetBrains AI Assistant: Restrict or Disable Features](https://www.jetbrains.com/help/ai-assistant/disable-ai-assistant.html).

## A comparison needs the same question and revision

To compare automatic and manual context, use the same repository state and a question with a verifiable answer. Examine the selected sources, not only response style or length. A manually attached decisive caller can explain an apparent quality improvement without implying that automatic retrieval is always poor. Conversely, automatic discovery can find an overlooked dependency. The experiment should identify which missing or irrelevant evidence changed the answer and why.

## Preserve a traceable explanation after editing

Once context supports an implementation, inspect the current files and validate the resulting behavior with appropriate existing checks. Discovery quality and patch quality remain different steps. A good final explanation identifies the concrete source of the problem and the resulting behavior rather than praising a context mode. The useful workflow lets another engineer follow the evidence from request through selected sources to change and validation, regardless of how the initial candidates were discovered.

Related reading: [Continue vs Cline vs Aider for local coding](/journal/continue-cline-aider-coding-choice/); [Reproducible inference stacks: preserving a GPU pilot’s result](/journal/software-stack-reproducibility/).
