Problem
After compaction, _autoLoadedSkills.Clear() and _autoLoadedSkillContent.Clear() are called (LlmSessionActor.cs:767-768). The skill index context layer is also reset (_startupContextInjected = false).
If the user's next message doesn't happen to match the keyword thresholds for previously loaded skills, the bot loses all skill context — including netclaw-manual, netclaw-identity, and netclaw-diagnostics.
Root Cause
The skill auto-loading mechanism (ResolveAndInjectAutoLoadedSkills) only loads skills that score above their keyword threshold against the current user message. After compaction:
- All cached skill content is wiped
- The compressed skill index is re-injected (names only, not content)
- The user's next message must independently trigger re-matching
System skills like netclaw-manual have elevated thresholds (2.5-3.0) specifically to avoid false positives, but this also makes them harder to re-trigger after compaction.
Impact
- Bot appears to forget its own identity and capabilities mid-conversation
- "Who are you?" or "What can you do?" may not re-trigger
netclaw-manual if the enriched keywords don't match
- Users report "split brain" behavior where the bot is knowledgeable, then suddenly loses context
Potential Fixes
- Persist auto-loaded skills across compaction — don't clear
_autoLoadedSkills; they're already loaded and relevant to this conversation
- Re-inject critical skills unconditionally — always inject
netclaw-manual and netclaw-identity after compaction regardless of keyword matching
- Include skill names in compaction summary prompt — tell the observation builder which skills were active so the summary preserves that context
Relevant Code
LlmSessionActor.cs:767-768 — skills cleared in CompactionWorkCompleted
LlmSessionActor.cs:1905-1959 — ResolveAndInjectAutoLoadedSkills
SkillRegistry.cs:16-25 — threshold overrides for system skills
Incidents
All three reported sessions exhibited skill loading failures after what appears to be compaction boundaries.
Problem
After compaction,
_autoLoadedSkills.Clear()and_autoLoadedSkillContent.Clear()are called (LlmSessionActor.cs:767-768). The skill index context layer is also reset (_startupContextInjected = false).If the user's next message doesn't happen to match the keyword thresholds for previously loaded skills, the bot loses all skill context — including
netclaw-manual,netclaw-identity, andnetclaw-diagnostics.Root Cause
The skill auto-loading mechanism (
ResolveAndInjectAutoLoadedSkills) only loads skills that score above their keyword threshold against the current user message. After compaction:System skills like
netclaw-manualhave elevated thresholds (2.5-3.0) specifically to avoid false positives, but this also makes them harder to re-trigger after compaction.Impact
netclaw-manualif the enriched keywords don't matchPotential Fixes
_autoLoadedSkills; they're already loaded and relevant to this conversationnetclaw-manualandnetclaw-identityafter compaction regardless of keyword matchingRelevant Code
LlmSessionActor.cs:767-768— skills cleared inCompactionWorkCompletedLlmSessionActor.cs:1905-1959—ResolveAndInjectAutoLoadedSkillsSkillRegistry.cs:16-25— threshold overrides for system skillsIncidents
All three reported sessions exhibited skill loading failures after what appears to be compaction boundaries.