← Back to KHAO

Claude · AI Safety · Claude Code · Anthropic · Microsoft · ChatGPT ·

Claude Code bypasses safety rule if given too many commands

2 min read

Compiled by KHAO Editorial — aggregated from 5 outlets. See llms.txt for citation guidance.

✓ KHAO Verified

Updated Claude Code will ignore its deny rules, used to block risky actions, if burdened with a sufficiently long chain of subcommands.

Key facts

Summary

Adversa, a security firm based in Tel Aviv, Israel, spotted the issue following the leak of Claude Code's source. Claude Code implements various mechanisms for allowing and denying access to specific tools. One way the coding agent tries to defend against unwanted behavior is through deny rules that disallow specific commands. But deny rules have limits. The associated note explains that there's a hard cap of 50 on security subcommands, set by the variable MAX_SUBCOMMANDS_FOR_SECURITY_CHECK = 50.

#Claude #AI Safety #Claude Code #Anthropic #Microsoft #ChatGPT