Compaction-continued sessions lose the skill inventory (skill_listing) — only deltas follow, model goes routing-blind to all skills

Status Open
Maintainer reply None cached
Activity 0 comments · opened Jul 28, 2026

Summary

After auto-compaction, a continued session loses the skill inventory (skill_listing attachments) and the harness never re-injects it. Only delta announcements (newly created/changed skills) arrive afterwards. The model is then routing-blind to all previously registered skills: their trigger descriptions are absent from context, and the model's standing instruction ("only invoke a skill that appears in the available-skills list; never guess skill names") actively prevents it from using skills it can no longer see.

Environment

  • Claude Code on macOS (darwin 24.3.0)
  • ~85 skills registered (user-level ~/.claude/skills/ + plugins)
  • Session continued via auto-compaction ("This session is being continued from a previous conversation that ran out of context")

What happened (verified from the session JSONL)

  1. Pre-compaction: the full skill_listing attachment appears 3× in the transcript — skill routing worked correctly (trigger phrases resolved to the right skills).
  2. Context overflow → auto-compaction. The rebuilt window contains system prompt + CLAUDE.md + memory + summary — but no skill listing (it lived on discarded conversation turns).
  3. The continued session then ran for a full day (~1,100 transcript lines) with zero full skill listings. The only skill_listing attachments in that window were deltas for a single newly created skill — so the model's "available skills" view contained exactly 1 of 85 skills.
  4. Consequence: a user instruction ("codex review") that has a dedicated skill (codex-review, with explicit trigger phrases and a warning to use the CLI, never the raw MCP tool) failed to route. The model, seeing only the similarly-named MCP tool in its context, invoked mcp__codex__codex instead — which hung the session for ~3 hours on a passive wait.
  5. Running /reload-skills / /reload-plugins re-injected the full listing and restored routing immediately.

Expected

Compaction-continuation should re-inject the current skill inventory (same attachment as session start), since delta announcements assume a base listing that no longer exists in the rebuilt context.

Workarounds found

  • Manual: /reload-skills after any compaction.
  • Automatic: a SessionStart hook (matcher compact) that emits the skill inventory into context.

Impact

Silent degradation: nothing errors, the model just stops seeing its skills. Sessions that rely on skill routing (procedures, safety-critical invocation patterns) misroute to raw tools — in our case turning a standard review procedure into a multi-hour hang.

View original on GitHub ↗