[BUG] /compact fails with cyber safeguards false positive during legitimate defensive security session
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?
The /compact command fails with a cyber safeguards policy violation error when the conversation contains legitimate defensive security content (hardening a personal website via Cloudflare, DNS, Vercel settings, npm audit, etc.). No offensive or harmfulcontent was discussed.
What Should Happen?
/compact should successfully summarize the conversation and reduce context size without triggering false positive cyber safeguards.
Error Messages/Logs
Error during compaction: API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy. This request triggered cyber-related safeguards.
Request ID: req_011CbWAkAsB6MLV5Dqf22Xcr
Request ID: req_011CbWAqc1epeGYcMRwkzZUx
Steps to Reproduce
- Have a long conversation about defensive website security (Cloudflare proxy, DMARC, security headers, npm audit, fixing leaked .env secrets)
- Run /compact to reduce context
- Error appears immediately — cyber safeguards triggered
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.156 (Claude Code)
Platform
Other
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
/compact
⎿ Error: Error during compaction: API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (https://www.anthropic.com/legal/aup). This request triggered cyber-related safeguards. To request an adjustment
pursuant to our Cyber Verification Program based on how you use Claude, fill out
https://claude.com/form/cyber-use-case?token=7YGQPHodm0rjo_yn70YScR8I35wlWMxG0PfTFcd15bmOG2hTCSqA51uwpGs5YEXDcS1qdxYUaaiJVd-cam4Nm4XVR-tTWtf7Yp2Qzhld0PR6dwf13130ME3P604jYhjNDAvbQIlHNw. To learn more about the program or provide feedback, visit o…
Please double press esc to edit your last message or start a new session for Claude Code to assist with a different task.
Request ID: req_011CbWAkAsB6MLV5Dqf22Xcr
❯ hey lets go
⎿ API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (https://www.anthropic.com/legal/aup). This request triggered cyber-related safeguards. To request an adjustment pursuant to our Cyber
Verification Program based on how you use Claude, fill out https://claude.com/form/cyber-use-case?token=w09pwh2mDseGT90DLcnuayjkXIWUc5vm2b0hEAnK0EdOBKLxVDQ9rZS6ZL60-XzF60yBs0M9bKXx6jyFFoO5NdpABYqUjz_cl0FDIUE7cZfSb93qgliNj0lLicdoPHvisa_LZNNnaw. To
learn more about the program or provide feedback, visit o… Please double press esc to edit your last message or start a new session for Claude Code to assist with a different task.
Request ID: req_011CbWAqc1epeGYcMRwkzZUx
✻ Crunched for 3s
❯ /model
⎿ Set model to Sonnet 4.6 (default) and saved as your default for new sessions
❯ hey why this happened compact
⎿ Error: Error during compaction: API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (https://www.anthropic.com/legal/aup). This request triggered cyber-related safeguards. To request an
adjustment
pursuant to our Cyber Verification Program based on how you use Claude, fill out
https://claude.com/form/cyber-use-case?token=7YGQPHodm0rjo_yn70YScR8I35wlWMxG0PfTFcd15bmOG2hTCSqA51uwpGs5YEXDcS1qdxYUaaiJVd-cam4Nm4XVR-tTWtf7Yp2Qzhld0PR6dwf13130ME3P604jYhjNDAvbQIlHNw. To learn more about the program or provide feedback, visit o…
Please double press esc to edit your last message or start a new session for Claude Code to assist with a different task.
Request ID: req_011CbWAkAsB6MLV5Dqf22Xcr
❯ hey lets go
⎿ API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (https://www.anthropic.com/legal/aup). This request triggered cyber-related safeguards. To request an adjustment pursuant to our Cyber
Verification Program based on how you use Claude, fill out https://claude.com/form/cyber-use-case?token=w09pwh2mDseGT90DLcnuayjkXIWUc5vm2b0hEAnK0EdOBKLxVDQ9rZS6ZL60-XzF60yBs0M9bKXx6jyFFoO5NdpABYqUjz_cl0FDIUE7cZfSb93qgliNj0lLicdoPHvisa_LZNNnaw. To
learn more about the program or provide feedback, visit o… Please double press esc to edit your last message or start a new session for Claude Code to assist with a different task.
Request ID: req_011CbWAqc1epeGYcMRwkzZUx
● The compaction failed because our conversation contained a lot of security-related content (Cloudflare config, subdomain takeover, vulnerability scanning, leaked secrets, etc.) which triggered Anthropic's automated cyber safeguards during the summary
process.
It's a false positive — everything we did was legitimate defensive security for your own website. The safeguard doesn't distinguish between "hardening your own site" and "attacking others."
How to fix it:
- Fill out the Cyber Verification Program form linked in the error — it lets Anthropic know you're doing defensive/personal security work and unlocks /compact for your account
- Or just start a new session — the conversation context resets but your files and git history are all saved
The work we did is all safely committed and pushed. Nothing is lost.
This issue has 10 comments on GitHub. Read the full discussion on GitHub ↗