[FEATURE] `/context` command should show ALL loaded context, not just Memory files

Resolved 💬 3 comments Opened Jan 6, 2026 by coygeek Closed Feb 19, 2026

Preflight Checklist

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

Problem Statement

The /context command is intended to help users understand what's loaded into Claude's context window. However, it only shows a subset of what's actually loaded—specifically the "Memory files" (CLAUDE.md and rules). It does not show:

  1. Hook-injected content — SessionStart hooks can inject significant context via additionalContext that doesn't appear in /context
  2. System reminders — Content injected by hooks during the session
  3. Parent directory CLAUDE.md files — When working in nested directories, CLAUDE.md files from parent directories are loaded but may not all display
  4. The internal system prompt wrapper — The framing text that introduces user instructions

Proposed Solution

I ran an experiment to catalog everything actually loaded at session start. I found 16 distinct context types totaling ~98KB:

| Context Type | Shown in /context? |
|--------------|---------------------|
| System reminders (hook success messages) | No |
| DateTime injection | No |
| Session ID/path | No |
| Session troubleshooting queries | No |
| Plan formatting instructions | No |
| Hook logging info | No |
| Documentation reference block | No |
| User working directories | No |
| CLAUDE.md consolidation check | No |
| Project structure tree | No |
| CLI documentation check | No |
| Project context (tech stack) | No |
| Recent git activity | No |
| Claude service status | No |
| CLAUDE.md + rules files | Yes |
| IDE context (opened file) | No |

The /context command showed ~10K tokens of "Memory files" but the actual context contained 118K tokens. This 10x discrepancy is confusing.

Alternative Solutions

Enhance /context to show all loaded context, organized by source:

> /context

Context Usage
⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁   claude-opus-4-5-20251101 · 118k/200k tokens (59%)

📁 Memory files (9.9k tokens)
├── ~/.claude/CLAUDE.md: 3.0k tokens
├── ~/.claude/rules/security/security.md: 515 tokens
├── ~/.claude/rules/lifecycle/*.md: 5.4k tokens
└── ~/.claude/rules/testing/testing.md: 534 tokens

📁 Project CLAUDE.md files (4.2k tokens)
├── .claude/hooks/CLAUDE.md: 2.1k tokens
└── .claude/hooks/inject-test-methodology/CLAUDE.md: 2.1k tokens

🪝 Hook-injected context (15.3k tokens)
├── SessionStart: inject-datetime: 228 tokens
├── SessionStart: project_structure.py: 650 tokens
├── SessionStart: inject_docs.py: 16.9k tokens
├── SessionStart: plan_template_injector.py: 15.4k tokens
└── ... (show all hooks that contributed)

🔧 System (18.4k tokens)
├── System prompt: 2.9k tokens
├── System tools: 15.5k tokens
└── Internal wrapper: ~100 tokens

💬 Messages (12.7k tokens)
└── Conversation history

⛶ Free space: 82k (41.0%)
⛝ Autocompact buffer: 77.0k tokens (38.5%)

Key improvements:

  1. Separate sections for each context source type
  2. Show hook names that contributed context (helps debugging)
  3. Show parent CLAUDE.md files explicitly with full paths
  4. Accurate token counts for each section

Priority

High - Significant impact on productivity

Feature Category

CLI commands and flags

Use Case Example

  1. User sets up SessionStart hooks to inject project documentation
  2. User notices Claude's responses are slower and context is filling up
  3. User runs /context to diagnose — sees only 10K tokens in "Memory files"
  4. User is confused because behavior suggests much more context is loaded
  5. User has no visibility into hook contributions or their token costs
  6. With this feature: User immediately sees hook X is injecting 50K tokens and can optimize

Additional Context

Technical notes

  • Hook-injected content comes via additionalContext in hook responses
  • This content IS included in the API call but NOT displayed in /context
  • The data exists — it's just not surfaced to users

Related debugging need

When hooks inject content, there's currently no way to verify:

  • Whether the hook ran successfully
  • What content it actually injected
  • How many tokens that content consumed

The enhanced /context would solve all of these.

Session data for reference

The experiment that revealed this gap was conducted on 2026-01-05. Full context export available at:
/Users/user/Desktop/session/ (16 separate files documenting each context type)

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗