Typing custom skill names triggers unnecessary compaction
Description
When typing a custom skill name (e.g. /refresh), Claude Code triggers a compaction cycle even though no meaningful work has been done. The skill invocation itself is lightweight — it just creates and deletes a task to refresh the TaskList — but the act of typing it causes Claude Code to compact the conversation.
This creates a disruptive UX: the operator types a quick skill command, and instead of instant execution, they wait 30-60 seconds for compaction before anything happens.
Steps to Reproduce
- Have a conversation with moderate context usage (~17% in my case)
- Type a custom skill (e.g.
/refresh— a skill that simply creates and deletes a task) - Observe that compaction triggers before the skill executes
Expected Behavior
Skill invocation should not trigger compaction. The skill input is a short command, not a large context addition. Compaction should only trigger based on actual context growth, not skill dispatch.
Actual Behavior
Compaction fires immediately after typing the skill, adding ~44 seconds of delay before the skill can execute.
Screenshot
!Compaction triggered by /refresh skill
The screenshot shows:
/refreshwas typed- "Compacting..." appears for 44 seconds
- Context usage was only at 17%
- The skill itself is trivial (create + delete a task)
Environment
- Claude Code CLI
- Model: Opus (1M context)
- Context usage: ~17% at time of compaction trigger
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗