claude-code - 💡(How to fix) Fix [BUG] /compact fails with cyber safeguards false positive during legitimate defensive security session

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

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

Root Cause

● 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.

Code Example

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
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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

  1. Have a long conversation about defensive website security (Cloudflare proxy, DMARC, security headers, npm audit, fixing leaked .env secrets)
  2. Run /compact to reduce context
  3. 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:

  1. 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
  2. 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.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] /compact fails with cyber safeguards false positive during legitimate defensive security session