Bug
When a new skill is added (either via config allowlist or by placing it in a workspace/managed skills directory), the skillsSnapshot cached in sessions.json is not invalidated by /restart or gateway restart. The stale snapshot persists and the new skill never appears in the session prompt.
Steps to Reproduce
- Have an existing session with a cached
skillsSnapshot in sessions.json
- Add a new skill to the workspace skills directory (e.g.
<workspace>/skills/my-skill/SKILL.md)
- Add the skill name to the agent's
skills allowlist in config (if applicable)
- Gateway restart (SIGUSR1) or
/restart command
- Send a message in the session
Expected: The skill appears in the session's available skills list
Actual: The skill does not appear. The stale skillsSnapshot from sessions.json is reused.
Evidence
- Gateway logs confirm the skill is loaded (Discord slash command count increased from 133 to 134)
- The
skillsSnapshot field in sessions.json for the session does not contain the new skill
- Multiple gateway restarts and
/restart commands did not clear the snapshot
- Manually deleting the
skillsSnapshot key from sessions.json and restarting fixed the issue
Environment
- OpenClaw 2026.3.24
- macOS (arm64)
- Multi-agent setup with per-agent
skills allowlist
Workaround
Manually delete the skillsSnapshot field from the affected session in <agentDir>/sessions/sessions.json and restart the gateway.
Suggested Fix
/restart (and gateway restart) should invalidate the skillsSnapshot so it rebuilds on the next turn. Alternatively, compare a hash of the current eligible skills against the cached snapshot and refresh if stale.
Bug
When a new skill is added (either via config allowlist or by placing it in a workspace/managed skills directory), the
skillsSnapshotcached insessions.jsonis not invalidated by/restartor gateway restart. The stale snapshot persists and the new skill never appears in the session prompt.Steps to Reproduce
skillsSnapshotinsessions.json<workspace>/skills/my-skill/SKILL.md)skillsallowlist in config (if applicable)/restartcommandExpected: The skill appears in the session's available skills list
Actual: The skill does not appear. The stale
skillsSnapshotfromsessions.jsonis reused.Evidence
skillsSnapshotfield insessions.jsonfor the session does not contain the new skill/restartcommands did not clear the snapshotskillsSnapshotkey fromsessions.jsonand restarting fixed the issueEnvironment
skillsallowlistWorkaround
Manually delete the
skillsSnapshotfield from the affected session in<agentDir>/sessions/sessions.jsonand restart the gateway.Suggested Fix
/restart(and gateway restart) should invalidate theskillsSnapshotso it rebuilds on the next turn. Alternatively, compare a hash of the current eligible skills against the cached snapshot and refresh if stale.