claude-code - 💡(How to fix) Fix [FEATURE] Feature Request: @mention / Selective On-Demand File Loading in Project Knowledge Base (Claude Desktop) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#57833Fetched 2026-05-11 03:24:10
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×2commented ×1mentioned ×1subscribed ×1

Error Message

  1. User sends a single debugging prompt about a FastAPI route error 500 error"

Fix Action

Fix / Workaround

Workarounds currently attempted:

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

Every file uploaded to a Claude Project's Knowledge Base is injected into the context window on every single prompt — regardless of whether that file is needed for that specific message. There is no mechanism to selectively load a file only when referenced.

For developers maintaining structured project workflows — versioned status reports (v1.md, v2.md...), active codebase files (main.py, linked modules), and instruction documents — this creates a severe compounding token burn problem:

  • A 40,000–50,000 token knowledge base re-injects that full payload on every prompt
  • A 10-message debugging session silently consumes 400,000–500,000 tokens, exhausting Free plan limits in 2–3 prompts and hitting unexpected walls on Pro
  • Users are forced to constantly delete and re-upload files, destroying the version history that Projects was designed to maintain

This directly undermines the core value proposition of the Projects feature.

Proposed Solution

A native @mention system for Project Knowledge files where:

  1. Files stored in Project Knowledge are dormant by default — NOT auto-loaded into every prompt
  2. Typing @filename.md or @main.py in a message explicitly loads only that file into context for that specific prompt
  3. Optional "pin" toggle for files that should persist across all prompts (e.g. instructions prompt, current status report)

This is identical in behavior to how Claude Code already handles files via on-demand filesystem tool calls — nothing burns until the agent explicitly reads it. The architecture exists. It needs to be surfaced as a UI-level @mention system in Claude Desktop Projects.

Alternative Solutions

Workarounds currently attempted:

  1. Keeping only one status report in knowledge base and deleting old versions — destroys version history, defeats the purpose of Projects
  2. Attaching files per-message instead of pre-loading — high friction, no persistence, manual overhead every session
  3. Consolidating all versioned docs into one file — same token burn, just harder to maintain
  4. Switching to Claude Code CLI for filesystem access — terminal-based agentic tool, not suitable for the audited review-first conversational workflow that Desktop enables

None of these are acceptable long-term. All trade organization for efficiency or vice versa.

Priority

Critical - Blocking my work

Feature Category

File operations

Use Case Example

Real workflow — AI/ML Engineer maintaining a computer vision project:

  1. Project Knowledge contains: instructions.md, v1_status.md, v2_status.md, v3_status.md, main.py, rtsp_handler.py Total: ~45,000 tokens

  2. User sends a single debugging prompt about a FastAPI route error Current behavior: All 45,000 tokens load. One message burns 45,000 tokens. A 10-message session = 450,000 tokens gone.

  3. With @mention system: User types: "Check @main.py for the FastAPI route causing the 500 error" Only main.py loads (~3,000 tokens). Same session = 30,000 tokens. 15x more efficient. Version history preserved. No files deleted.

  4. User then types: "Compare with @v2_status.md to see what changed" Only v2_status.md loads for that prompt. Everything else stays dormant.

This is exactly how Claude Code handles @Files and @Folders today by using grep to mentioned files or folder.

Additional Context

  • Claude Code already implements on-demand file reading natively via filesystem tool calls — this feature request is asking to port that behavior to the Desktop Projects UI
  • Gemini Code Assist in VS Code has @Files / @Folders selective context injection as a shipped feature (reference: screenshot attached)
  • This affects every power user maintaining living documentation, iterative codebases, and multi-version status reports in Projects
  • The gap between Claude Code (selective) and Claude Desktop (eager-load everything) creates unnecessary friction pushing users toward the CLI when their workflow is better served by a conversational interface

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING