Feature: Lazy loading for plugins to reduce context overhead
Resolved 💬 3 comments Opened Jan 6, 2026 by johnb-datavant Closed Jan 10, 2026
Problem
Plugins load all their agents, skills, and MCP tools into context at session start, even when they won't be used. For feature-rich plugins like compound-engineering, this can consume 8-15% of available context (15k+ tokens) before the user even types anything.
Current Workaround
Users must:
- Disable the plugin in
settings.json - Use
--settings '{"enabledPlugins":{"plugin@marketplace":true}}'via alias when needed
This works but is clunky.
Proposed Solution
Add lazy/on-demand plugin loading. Options could include:
--enable-plugin <name>CLI flag - Enable a disabled plugin for this session only (inverse of current behavior)
- Lazy discovery mode - Only load plugin name/description at startup; load full agents/skills/MCP when first invoked
- Per-project plugin configs - Allow
.claude/settings.local.jsonto override which plugins are enabled for specific projects
- Plugin profiles - Define named plugin sets (e.g.,
claude --profile heavyvs default lite)
Use Case
I use compound-engineering for complex code reviews and planning workflows, but not for quick queries. Currently I either:
- Pay the 15k token tax every session, or
- Maintain shell aliases with JSON overrides
A first-class solution would improve UX significantly.
Environment
- Claude Code version: latest
- OS: macOS
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗