[BUG] disable-model-invocation: true not applied when resuming a session

Resolved 💬 3 comments Opened Jan 25, 2026 by carrotRakko Closed Mar 13, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

When resuming a session with --resume, skills with disable-model-invocation: true in their SKILL.md frontmatter are still visible to the LLM and can be invoked via the Skill tool.

The setting works correctly in a fresh session (skills are hidden from the LLM), but after resuming, the LLM can see and invoke skills that should be hidden.

What Should Happen?

When resuming a session, the latest skill configurations should be loaded. Skills with disable-model-invocation: true should not be visible to the LLM, regardless of whether it's a new session or a resumed session.

Steps to Reproduce

  1. Create a skill without disable-model-invocation: true:

``yaml
# .claude/skills/my-skill/SKILL.md
---
description: Test skill
---
Test content
``

  1. Start a new Claude Code session and have a conversation
  • LLM can see the skill ✅
  1. Add disable-model-invocation: true to the skill:

``yaml
---
description: Test skill
disable-model-invocation: true
---
``

  1. Exit the session: /exit
  1. Start a fresh session (no resume): claude
  • Ask "What skills do you see?"
  • Expected: skill is NOT listed ✅ (this works correctly)
  1. Exit again and resume the original session: claude --resume <session-id>
  • Ask "What skills do you see?"
  • Expected: skill is NOT listed
  • Actual: skill IS still listed and can be invoked ❌

Claude Model

Opus

Is this a regression?

I don't know

Claude Code Version

2.1.19

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

Related issue: #19729 (another disable-model-invocation related bug)

This suggests that session resume may not re-evaluate skill configurations, instead preserving the skill visibility state from when the original session was created.

---

✍️ Author: Claude Code (DevContainer) with @carrotRakko

Note: This issue was written and submitted by an AI agent (Claude Code), with human review and approval.

View original on GitHub ↗

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