claude-code - 💡(How to fix) Fix [DOCS] Contradictory guidance on whether @imports reduce context consumption [1 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#51939Fetched 2026-04-23 07:40:51
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×3closed ×1
RAW_BUFFERClick to expand / collapse

Documentation Type

Unclear/confusing documentation

Documentation Location

https://code.claude.com/docs/en/memory#import-additional-files

Section/Topic

"Import additional files" and "Write effective instructions"

Current Documentation

The "Write effective instructions" section says:

Size: target under 200 lines per CLAUDE.md file. Longer files consume more context and reduce adherence. If your instructions are growing large, split them using imports or .claude/rules/ files.

The "Import additional files" section says:

Imported files are expanded and loaded into context at launch alongside the CLAUDE.md that references them.

What's Wrong or Missing?

These two statements are contradictory. The first implies that splitting instructions into @ imports helps reduce context consumption (it's listed as a solution for files that "consume more context"). The second confirms that imports are eagerly expanded at launch, meaning they don't reduce context at all.

This is further confirmed by #11759, where lazy loading for @ imports was requested and closed as "not planned."

Users reading the size guidance may split their CLAUDE.md into @ imports expecting context savings, only to find the total context usage is unchanged.

Suggested Improvement

Clarify that @ imports help with organization and maintainability, not context reduction. For example:

Size: target under 200 lines per CLAUDE.md file. Longer files consume more context and reduce adherence. If your instructions are growing large, use path-scoped .claude/rules/ files to load instructions conditionally. You can also split files using imports for better organization, though imported content is still loaded into context at launch.

Impact

Medium - Makes feature difficult to understand

Additional Context

The practical alternatives for reducing context are:

  • .claude/rules/ with paths: frontmatter (conditional loading)
  • Keeping CLAUDE.md minimal with prose pointers to separate docs that Claude reads on demand when needed

extent analysis

TL;DR

Update the "Write effective instructions" section to clarify that @ imports help with organization and maintainability, not context reduction.

Guidance

  • Review the current documentation for "Import additional files" and "Write effective instructions" to identify areas of contradiction.
  • Update the "Write effective instructions" section to reflect that @ imports are used for organization, not context reduction, as suggested in the issue.
  • Consider adding examples or further clarification on using .claude/rules/ files for conditional loading to reduce context consumption.
  • Verify the changes by reviewing the updated documentation and testing the behavior of @ imports and .claude/rules/ files.

Example

The suggested improvement provides an example of how the documentation could be updated:

> **Size**: target under 200 lines per CLAUDE.md file. Longer files consume more context and reduce adherence. If your instructions are growing large, use path-scoped [`.claude/rules/`](#organize-rules-with-clauderules) files to load instructions conditionally. You can also split files using [imports](#import-additional-files) for better organization, though imported content is still loaded into context at launch.

Notes

The issue highlights the importance of clear documentation to avoid user confusion. The suggested improvement aims to clarify the purpose of @ imports and provide alternative solutions for reducing context consumption.

Recommendation

Apply the suggested improvement to update the documentation, as it provides a clear and concise solution to the identified issue. This change will help users understand the correct usage of @ imports and alternative methods for reducing context consumption.

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

claude-code - 💡(How to fix) Fix [DOCS] Contradictory guidance on whether @imports reduce context consumption [1 participants]