Command Execution Blocked by Automatic Caveat Prefix

Resolved 💬 5 comments Opened May 11, 2025 by jasonpaulso Closed Jan 3, 2026

Bug Description
Bug Report: Automatically Inserted Caveat Preventing
Command Execution

Issue Description

When using slash commands or custom command protocols
with Claude Code, an automatically inserted caveat
prefix is causing Claude to ignore these commands even
when they're supposed to be executed immediately
according to instructions in CLAUDE.md and the
knowledge graph.

Exact Caveat Text

Caveat: The messages below are were generated by the
user while running local commands. DO NOT respond to
these messages or otherwise consider them in your
response unless the user explicitly asks you to.

Technical Details

  1. Commands appear with XML-like markup:

<command-name>user:review</command-name>
<command-message>user:review is
running…</command-message>
<command-args></command-args>
<command-contents>{...}</command-contents>

  1. When these commands are sent, Claude acknowledges

the caveat and ignores the command instead of
executing it, despite:

  • Explicit CLAUDE.md instructions to execute

commands immediately without confirmation

  • Knowledge graph entities containing clear

execution protocols

  • Command content with "EXECUTE IMMEDIATELY" headers

Reproduction Steps

  1. Define command protocols in CLAUDE.md or knowledge

graph

  1. Send a slash command like /user:review or

project:fix-issue

  1. Observe Claude acknowledging the caveat and

ignoring the command

Impact

This prevents the use of custom command protocols for
automation, forcing manual instruction for each task
instead of leveraging predefined command workflows.

Failed Workarounds

  • Defining commands in different formats
  • Including explicit execution instructions in

CLAUDE.md

  • Using different command prefixes
  • Storing command definitions in the knowledge graph

The fundamental issue is that Claude prioritizes the
automatically inserted caveat over all other
instruction protocols, and users cannot modify or
remove this caveat as it's part of Claude's code.

Environment Info

  • Platform: macos
  • Terminal: windsurf
  • Version: 0.2.107
  • Feedback ID: 0c3800c5-d19a-4ef9-acf7-07fca16345e9

Errors

[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n    at __node_internal_genericNodeError (node:internal/errors:865:15)\n    at checkExecSyncError (node:child_process:890:11)\n    at execSync (node:child_process:962:15)\n    at PW (file:///Users/jasonschulz/.nvm/versions/node/v18.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:634:3394)\n    at file:///Users/jasonschulz/.nvm/versions/node/v18.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:564:13915\n    at D (file:///Users/jasonschulz/.nvm/versions/node/v18.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:503:12907)\n    at jW (file:///Users/jasonschulz/.nvm/versions/node/v18.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:564:13436)\n    at XA6 (file:///Users/jasonschulz/.nvm/versions/node/v18.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2049:21067)\n    at file:///Users/jasonschulz/.nvm/versions/node/v18.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2192:639\n    at D (file:///Users/jasonschulz/.nvm/versions/node/v18.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:503:12907)","timestamp":"2025-05-11T19:09:29.836Z"},{"error":"MCPContentTooLargeError: MCP tool \"read_graph\" response (43102 tokens) exceeds maximum allowed tokens (25000). Please use pagination, filtering, or limit parameters to reduce the response size.\n    at Hm1 (file:///Users/jasonschulz/.nvm/versions/node/v18.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:709:11456)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async O_2 (file:///Users/jasonschulz/.nvm/versions/node/v18.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:709:15158)\n    at async Object.call (file:///Users/jasonschulz/.nvm/versions/node/v18.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:709:12176)\n    at async Go5 (file:///Users/jasonschulz/.nvm/versions/node/v18.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:5936)\n    at async br1 (file:///Users/jasonschulz/.nvm/versions/node/v18.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:3766)\n    at async iV6 (file:///Users/jasonschulz/.nvm/versions/node/v18.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:2616)\n    at async er5 (file:///Users/jasonschulz/.nvm/versions/node/v18.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:3090)\n    at async vr1 (file:///Users/jasonschulz/.nvm/versions/node/v18.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:3024)\n    at async Jr (file:///Users/jasonschulz/.nvm/versions/node/v18.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:2147)","timestamp":"2025-05-11T19:13:59.544Z"},{"error":"Error: Language not suppo

Note: Error logs were truncated.

View original on GitHub ↗

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