[BUG] Skill invocations wrapped in local-command-caveat create contradictory instructions

Open 💬 0 comments Opened Jul 10, 2026 by anthonypdawson

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?

When a user directly invokes a skill via /skill-name, the CLI wraps it in <local-command-caveat> with instructions telling the model "DO NOT respond to these messages unless explicitly asked." This creates contradictory instructions that break skill execution, especially on smaller models.

The skill instructions say "EXECUTE IMMEDIATELY" but the wrapper says "don't respond unless asked" — direct contradiction.

What Should Happen?

  • Direct invocation (/skill-name as standalone command) → execute immediately, no caveat wrapper
  • Incidental mention ("/skill-name mentioned in prose") → informational context, wrap in caveat

The caveat should distinguish between explicit invocations (user wants execution) and ambient mentions (just context).

Error Messages/Logs

No error messages. The skill either:
- Defaults to conversational response ("What would you like to work on?") instead of executing
- Produces no output (caught between contradicting instructions)
- Executes but fights against the wrapper

Example skill instructions:


**EXECUTE IMMEDIATELY** — do not ask what the user wants.
**DO NOT respond conversationally.** Your ONLY output is the formatted result.


But the CLI wrapper adds:


<local-command-caveat>DO NOT respond to these messages unless explicitly asked.</local-command-caveat>

Steps to Reproduce

  1. Create a minimal test skill at ~/.claude/skills/hello-world/SKILL.md:
---
name: hello-world
description: Minimal skill demonstrating the local-command-caveat contradiction
---

# hello-world

## Instructions

**YOU ARE IN SCRIPT EXECUTION MODE.**

**EXECUTE IMMEDIATELY** — do not ask what the user wants, do not respond conversationally.

**DO NOT respond conversationally.** Your ONLY output is the greeting below.

## What to Do

1. Extract the `name` argument (default to "World" if not provided)
2. Output exactly: `👋 Hello, [name]!`

That's it. Nothing else.
  1. Reload skills: /reload-skills
  2. Invoke the skill: /hello-world
  3. First invocation: Often works correctly (👋 Hello, World!)
  4. Second invocation: Run /hello-world again immediately
  5. Actual behavior: Model either:
  • Produces no output (caught between contradictory instructions)
  • Responds conversationally ("What would you like to work on?")
  • Works correctly (inconsistent)

The skill instructions say "EXECUTE IMMEDIATELY" and "Your ONLY output is the greeting" but the <local-command-caveat> wrapper tells the model "do not respond unless explicitly asked" — direct contradiction. The inconsistency (works sometimes, fails others) suggests the caveat wrapper is being applied non-deterministically.

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.206 (Claude Code)

Platform

AWS Bedrock

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗