Skip to content

fix(skill): work around Claude Code permission prompt heuristics#66

Merged
AmethystLiang merged 1 commit intostablyai:mainfrom
nikicat:fix/skill-claude-code-permission-workarounds
Mar 14, 2026
Merged

fix(skill): work around Claude Code permission prompt heuristics#66
AmethystLiang merged 1 commit intostablyai:mainfrom
nikicat:fix/skill-claude-code-permission-workarounds

Conversation

@nikicat
Copy link
Contributor

@nikicat nikicat commented Mar 14, 2026

Summary

  • Add formatting rules section to SKILL.md documenting Claude Code permission prompt triggers
  • Replace all "#channel" examples with bare "channel" names across SKILL.md, commands.md, and targets.md
  • Remove inline # comments from code examples in targets.md

Context

Claude Code's permission checker has security heuristics that trigger manual approval prompts even when commands match Bash(agent-slack search *) allow rules. After extensive testing, we identified 5 patterns that cause this:

  1. # anywhere in command string (e.g. --channel "#general")
  2. Consecutive quotes '' or "" (e.g. .get('key', ''))
  3. Pipe + mixed quote types (e.g. | python3 -c "x = 'hello'")
  4. ||/&& chains with agent-slack commands
  5. File redirects (>, >>)

Full findings: anthropics/claude-code#34379

Test plan

  • Verified bare channel names work identically to hash-prefixed names in the CLI
  • Confirmed commands following these rules auto-allow without permission prompts
  • Tested in multiple fresh Claude Code sessions

Claude Code's permission checker has several security heuristics that
trigger manual approval prompts even when commands match allow rules.
This adds formatting rules to the skill and removes the hash prefix
from all channel name examples to avoid these triggers.

Triggers identified and documented:
1. Hash character anywhere in command string (treated as comment)
2. Consecutive quotes '' or "" (potential obfuscation check)
3. Pipe + mixed quote types (' and " in same command)
4. || or && chains with agent-slack commands
5. File redirects (>, >>)

See: anthropics/claude-code#34379

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@AmethystLiang AmethystLiang merged commit 723326a into stablyai:main Mar 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants