claude-code - 💡(How to fix) Fix [BUG] False positives "API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (https://www.anthropic.com/legal/aup)" [1 comments, 2 participants]

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…
GitHub stats
anthropics/claude-code#50795Fetched 2026-04-20 12:12:50
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1

Error Message

API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (https://www.anthropic.com/legal/aup)

Code Example

API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (https://www.anthropic.com/legal/aup)
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?

When doing completly normal stuff or continuing projects claude-code often chokes on markdowns or code it has written itself and later reads with:

API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (https://www.anthropic.com/legal/aup) ...

What Should Happen?

claude code should not trigger and potentially lockup sessions with this behavior, if it happens in the middle of a /compact it will destroy the session as the user then manually needs to edit the log to be able to restore the session.

Error Messages/Logs

API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (https://www.anthropic.com/legal/aup)

Steps to Reproduce

appears randomly

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.114

Platform

Anthropic API

Operating System

Other

Terminal/Shell

Other

Additional Information

seen a lot more since a month... especially in complicated coding session or worse: legit reverse engineering.

extent analysis

TL;DR

The issue may be resolved by reviewing and adjusting the usage of Claude Code to comply with the Anthropic Usage Policy, as the error message suggests a policy violation.

Guidance

  • Review the Anthropic Usage Policy (https://www.anthropic.com/legal/aup) to understand what types of requests may be violating the policy.
  • Check the markdowns and code generated by Claude Code for any potential policy-violating content, especially in complicated coding sessions or reverse engineering tasks.
  • Consider breaking down complex coding sessions into simpler tasks to reduce the likelihood of triggering the policy violation error.
  • If the issue persists, try to identify any specific patterns or triggers that lead to the error, such as specific code snippets or markdown formats.

Notes

The root cause of the issue is unclear, but it appears to be related to the Anthropic Usage Policy. The fact that the issue has increased in frequency over the past month suggests that it may be related to changes in the user's workflow or the complexity of the coding sessions.

Recommendation

Apply workaround: Review and adjust the usage of Claude Code to comply with the Anthropic Usage Policy, as this is the most likely cause of the issue.

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