Session startup context overhead consumes ~20% of context window before first user message

Resolved 💬 3 comments Opened Apr 17, 2026 by otaviosenne Closed May 29, 2026

Problem

Every new Claude Code session starts with a massive injected context I cannot control, consuming a significant portion of the context window before I type anything. This is especially damaging for users with many plugins/skills installed.

What's loaded automatically on every session

  • Full skill list from all installed plugins (~100+ skills, each with descriptions)
  • MCP tool schemas for every connected server (context7, chrome-agent-mcp, android-emulator-mcp, etc.)
  • CLAUDE.md files (project + global)
  • Plugin-injected system-reminder blocks (e.g. claude-mem injected 1,579 tokens + 13 MCP tool schemas every session)
  • Auto-memory context blocks

Impact

  • ~20% of my context window is consumed before I write a single message
  • Sessions with long conversations end prematurely and the window is lost
  • Tool calls with large outputs (e.g. ps, file reads) accelerate exhaustion
  • Combined with MCP process spawning bugs, this created a feedback loop: more sessions opened → more RAM → system instability → more sessions needed

Expected behavior

  • Lazy-load skill descriptions — only inject a skill's full content when it's actually invoked (the ToolSearch pattern already does this for MCP tool schemas, but system-reminder blocks from plugins are still injected upfront on every session — this is inconsistent)
  • Lazy-load plugin system-reminder blocks using the same deferred mechanism already used for MCP schemas
  • Add a /context command showing a token breakdown of what was auto-loaded at session start
  • Allow users to configure which plugins inject context automatically

Why this matters

You already implemented lazy-loading for MCP tool schemas via ToolSearch — that's great. But plugin system-reminder instructions are still eagerly injected in full. Applying the same deferred pattern to plugin instructions would dramatically reduce startup overhead for power users.

Environment

  • Claude Code CLI (Linux, Fedora + Hyprland)
  • Plugins: superpowers, context7, vercel, frontend-design
  • Model: claude-opus-4-7 (1M context)

View original on GitHub ↗

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