[BUG] /compact and auto-compaction drop entire Available skills system-reminder; /reload-skills recovers with "no changes"

Open 💬 3 comments Opened Jul 6, 2026 by HappyOnigiri

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Both manual /compact and auto-compaction completely remove the "Available skills" <system-reminder> block from the model's context. After compaction, the model reports that no Available skills list exists — not just some skills missing, but the entire catalog is gone.

Running /reload-skills after compaction prints:

Reloaded skills: 33 skills available (no changes)

The (no changes) output confirms the underlying skill registry is intact — no skill files were added, removed, or modified. Yet after /reload-skills, the model can immediately see all 33 skills again.

This means the bug is specifically in the post-compaction re-injection of the Available skills system-reminder into the model context, not in the skill registry itself.

What Should Happen?

After compaction (both manual and auto), the Available skills system-reminder should be re-injected into the model context, just as it is at session start. The model should retain awareness of all registered skills without requiring the user to manually run /reload-skills.

Error Messages/Logs

Note: The initial count (27) differs from the post-reload count (33) — this is likely a model counting error, not a registry change. /reload-skills confirmed (no changes), meaning no skills were added or removed. A separate auto-compaction test showed a consistent 33 → gone → 33 cycle.
❯ List the number of skills shown in the Available skills system-reminder
  in your current context. Do not read any files — only use what is
  already in your context.

27 skills.

❯ I'm investigating a compaction bug.
  Read about 10 files to fill the context window.

Reading about 10 files from the project.

  Searched for 1 pattern, read 10 files

Read 10 files (floodfill.ts, math.ts, outline.ts, ops.ts, quantizer.ts,
processor.ts, colorUtils.ts, worker.ts, detector.ts, types.ts).
Context window consumption goal achieved. What should I investigate next?

❯ /compact
  ⎿  Compacted (ctrl+o to see full summary)

❯ List the number of skills shown in the Available skills system-reminder
  in your current context. Do not read any files — only use what is
  already in your context.

I checked the current context, but there is no "Available skills"
system-reminder block. What I can see is "Available agent types"
(claude, claude-code-guide, Explore, general-purpose, Plan,
statusline-setup — 6 types) and the deferred tools list only.

Therefore, the accurate answer is: "There is no Available skills list
in the current context."

❯ /reload-skills
  ⎿  Reloaded skills: 33 skills available (no changes)

❯ List the number of skills shown in the Available skills system-reminder
  in your current context. Do not read any files — only use what is
  already in your context.

The Available skills system-reminder in the current context lists
33 skills.

<details>
<summary>Raw console output (Japanese)</summary>

 ▐▛███▜▌   Claude Code v2.1.202
▝▜█████▛▘  Sonnet 5 with medium effort · Claude API
  ▘▘ ▝▝    ~/dev/PixelRefiner


❯ 現在コンテキストに表示されている Available skills の system-reminder に載っているスキルの個数を教えてください。
  ファイルは一切読まず、今のコンテキスト内にある情報だけで回答してください。

27個です。

✻ Cooked for 2s

❯ コンパクションにおける不具合を調査します。
  コンテキストウィンドウを埋めるために、10圏程度のファイルを読み込んでください。

プロジェクト内のファイルを10個ほど読み込みます。

  Searched for 1 pattern, read 10 files

10ファイルほど読み込みました(floodfill.ts, math.ts, outline.ts, ops.ts, quantizer.ts, processor.ts, colorUtils.ts, worker.ts, detector.ts, types.ts)。コンテキストウィンドウの消費目的は達成できたはずです。次に何を調査しますか?

✻ Worked for 20s

❯ /compact
  ⎿  Compacted (ctrl+o to see full summary)
Read ../../.claude/memory/MEMORY.md (7 lines)
Referenced file src/core/processor.ts
Read AGENTS.md (42 lines)
Read src/shared/types.ts (66 lines)
Referenced file src/core/quantizer.ts

❯ 現在コンテキストに表示されている Available skills の system-reminder に載っているスキルの個数を教えてください。
  ファイルは一切読まず、今のコンテキスト内にある情報だけで回答してください。

現在のコンテキストを確認しましたが、"Available skills" という system-reminder ブロックは表示されていません。見えているのは「Available agent types」(claude, claude-code-guide, Explore, general-purpose, Plan, statusline-setup の6種)と、deferred tools のリストのみです。

そのため、この質問に対しては「現在のコンテキスト内に Available skills の一覧は存在しない」というのが正確な回答になります。

✻ Baked for 5s

❯ /reload-skills
  ⎿  Reloaded skills: 33 skills available (no changes)

❯ 現在コンテキストに表示されている Available skills の system-reminder に載っているスキルの個数を教えてください。
  ファイルは一切読まず、今のコンテキスト内にある情報だけで回答してください。

現在のコンテキストに表示されている Available skills の system-reminder には、33個のスキルが記載されています。

</details>

Steps to Reproduce

  1. Start a new session in a project with registered skills (global and/or project-level)
  2. Ask the model to count available skills from its context (without reading files) — confirms baseline count
  3. Fill the context window by reading ~10-30 source files
  4. Run /compact (or continue filling until auto-compaction fires)
  5. Ask the model to count available skills again — it reports the Available skills list is completely missing from context
  6. Run /reload-skills — prints N skills available (no changes)
  7. Ask the model to count again — full skill list is restored

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.202 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

Model: Reproduced with both Sonnet 5 and Opus 4.6.
OS: macOS 15.7.7
Terminal: Ghostty 1.3.1

Key observation

/reload-skills reports (no changes) — the skill registry never lost any skills. The issue is purely that the compaction process does not re-inject the Available skills <system-reminder> block into the post-compaction context.

The same behavior is confirmed with auto-compaction as well — after auto-compaction fires, the entire Available skills catalog disappears from context and /reload-skills recovers it with (no changes).

Related issues

This is a known class of problems that has been reported multiple times but never received an official fix:

  • #13919 — Skills context completely lost after auto-compaction (closed as stale, no Anthropic response)
  • #27703 — Project-level skills disappear from available list mid-session (closed as duplicate)
  • #43092 — Project-level skills intermittently become 'Unknown skill' (closed as stale)
  • #61485 — /reload-plugins does not re-inject available-skills context (closed as duplicate)

This report differs from the above in that:

  1. All skills disappear (not just project-level — the entire catalog is gone)
  2. Both manual and auto-compaction are confirmed to exhibit the same behavior
  3. The (no changes) output from /reload-skills definitively proves the registry is intact and the issue is in context re-injection
  4. A clear reproduction procedure is provided

Current workaround

Run /reload-skills immediately after every /compact or auto-compaction event.

View original on GitHub ↗

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