High startup context consumption from system prompt components (~28% before first user message)

Status Fixed / completed
Maintainer reply None cached
Activity 3 comments · opened Jun 10, 2026 · closed Jun 10, 2026

Summary

A new session in a moderately-configured project consumes roughly 28% of the available context window before the user sends a single message. This significantly limits effective session length for any substantive work.

Environment

  • Claude Code CLI (desktop app / zsh)
  • macOS Darwin 25.3.0
  • Model: claude-sonnet-4-6

Observed behavior

On session start, approximately 28% of context is already consumed. The contributing components (estimated, in rough size order):

  1. Tool definition schemas — full JSON schemas for all available tools, including the deferred tool list (~200+ tool names with descriptions)
  2. Project CLAUDE.md — project-specific instructions (in this case a long file covering ~15 protocol areas)
  3. Global CLAUDE.md — user-wide engineering principles, system references, response style
  4. MEMORY.md — auto-loaded project memory index (~80+ entries)
  5. Session-start system reminders — MCP server instructions, skills list (~60+ skills), hook output injected via UserPromptSubmit

Expected behavior

Startup overhead should be low enough that a full session's worth of work can happen before context pressure forces a /clear or new session. For users with large CLAUDE.md configurations or many MCP servers/skills, 28% pre-consumption leaves limited headroom.

Notes

  • The deferred tool list (tools that require ToolSearch before use) still appears to contribute significant token cost even though schemas are not loaded upfront — the names + descriptions alone add up
  • The skills list in system reminders is verbose; a compact registry format could reduce cost substantially
  • MEMORY.md auto-loading on every turn (via system-reminder) means the cost is paid repeatedly, not just at session start

Not a crash / correctness bug — reporting for awareness and potential optimization.

View original on GitHub ↗

3 Comments

jescoti · 4 months ago

Filed in error — closing. Please disregard.

github-actions[bot] · 4 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/66256
  2. https://github.com/anthropics/claude-code/issues/50133
  3. https://github.com/anthropics/claude-code/issues/41812

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] · 2 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.