Claude Code 'Unable to Respond' Usage Policy Error
Claude Code says it is unable to respond because a request appears to violate the Usage Policy. What the error means, what to try, and how to protect your work.
TroubleshootingUpdated 7 min read
On this page
You were working normally, and Claude Code stopped with this:
API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (https://www.anthropic.com/legal/aup)Nothing you typed looked wrong. This page covers what is known about the error, the workarounds that make sense, and how to keep a long session from being lost.
Why it happens
The message is a response from Anthropic's service. Anthropic's support pages describe detection models that flag potentially harmful content and safety filters on prompts that may block responses when content is flagged. Claude Code runs on the same service, so it can hit the same filters. Anthropic does not publish which text triggers a block. These are the causes we can name, most likely first:
- A false positive on ordinary content. The one public report we know of (a GitHub issue on the Claude Code repository, last seen April 2026) describes the error on plain markdown and on code the agent wrote itself. The reporter said it became much more frequent over the previous month, especially in complex or reverse-engineering sessions. That is one person's account, not a confirmed pattern.
- Flagged text sitting in the conversation history. Claude Code sends the conversation so far with each request. If a file, tool result or earlier reply trips the check, later turns could fail too. This is our inference, not something Anthropic has confirmed.
- Work that is close to a policy line. Security research, exploit analysis and reverse engineering can look similar to disallowed requests even when the intent is fine.
- Stricter filtering on an account. Anthropic says it may temporarily apply enhanced safety filters to users who repeatedly violate its policies. If you have had a warning before, this is worth ruling out.
It is not an install problem, a network problem or a login problem. Reinstalling Claude Code or changing DNS will not help.
| Symptom | Likely cause | What to do |
|---|---|---|
| One prompt fails, the next works | Single false positive | Resend once with less in it |
| Every message in the session fails | Trigger is in the history | Start a fresh session with a summary |
Fails during /compact | The summary step sees the flagged text | Commit first, keep notes in a file |
| Fails again and again across sessions | Work near a policy line, or an account-level filter | Narrow the task, read the policy, contact support |
Step-by-step fixes
Fix 1: Resend once with less in the message
Symptom: the error appears right after you send a prompt.
- Remove what the task doesn't need: pasted logs, long file dumps, quoted third-party text.
- State the task and its purpose plainly, for example "refactor this parser and keep behavior identical".
- Split a large request into smaller steps.
- Send it once more.
Anthropic's own guidance for a related message, an incomplete thought process in chat, is that you can try reframing your prompt to approach the problem from a different angle. Reframing here means being clearer about the task, not hiding what it is. If the same prompt fails twice, stop retrying and move on to Fix 2.
Fix 2: Start a fresh session if every message fails
Symptom: even a simple message fails, and it keeps failing.
- Exit the session.
- Before leaving, optionally run
/exportto write the whole conversation to a file./exportwrites the whole conversation to a file, which is useful for your own records. - Start a new session in the same project folder.
- Give it a short written summary of the task and the current state instead of the old history.
- Ask it to read only the files it needs.
Resuming the old session is worth one try if the first failure looked like a one-off. claude --continue resumes the most recent session, claude --resume opens a list to pick from, and sessions are stored locally per project directory. If the error comes straight back, the trigger is probably in that history, so start fresh.
If you only want to wipe the conversation but stay in the same window, /clear starts fresh. It keeps CLAUDE.md and settings loaded. Anthropic's help pages also warn that /clear cannot be undone, so export first if you might need the history.
Fix 3: Protect your work before /compact
Symptom: the error appeared during /compact, and the session is unusable afterward.
The reporter says a failure at this step can destroy a session. /compact summarizes the conversation so far into a short recap, and Claude Code also auto-compacts when you get close to the limit, so it can run without you asking. You can't control what compaction sees, but you can make a failure cheap:
- Commit or stash your changes before a long session gets near compaction. The code stays safe in git even if the conversation doesn't.
- Ask the agent to write its plan, decisions and next steps into a notes file in the repo, for example
NOTES.md. - Consider running
/compactyourself at a natural pause, so the moment it runs is one you chose and have already backed up. - If compaction fails and the session won't recover, start a new session and point it at the notes file.
If you run Claude Code inside Sledbot, Sled Core also takes git snapshots of the working tree at the end of each agent turn. That protects your files, not the conversation.
Fix 4: Keep complex sessions narrow
The reporter saw the error most in long, complex and reverse-engineering sessions. We don't know why, but narrow sessions give you less to lose.
- Work in shorter sessions with one goal each. Anthropic's own tips say to use
/clearbetween tasks, because long sessions accumulate noise. - Point the agent at files instead of pasting large generated output, binary dumps or disassembly into the conversation.
- If your work is legitimate security or reverse-engineering research, read Anthropic's Usage Policy (the link in the error text). Some requests may fall outside it, and no rewording changes that. Don't try to disguise what the task is.
Fix 5: Rule out an account-level flag
If the error shows up in many unrelated sessions, check whether you have received a warning. Anthropic says it warns users when it believes their prompts are violating the Usage Policy. See Anthropic's support article on safeguards warnings and appeals. It also explains that for API customers, warnings are linked to ongoing thresholds of violative behavior across the entire API account, so another project on the same key can matter.
Fix 6: Finish the task with a different agent
If you are blocked on a deadline, your working tree is not tied to one tool. Commit your work and continue with another coding agent in the same repository. Other agents have their own policies and limits, so check them first. Conversation history doesn't transfer, so give the new agent the same short summary you would give a fresh Claude Code session.
Checklist before you try again
- Your changes are committed or stashed.
- Plan and decisions are written into a file in the repo.
- The prompt states the task plainly and contains no unneeded pasted text.
- You are in a fresh session if the old one failed twice.
- You have saved the exact error text and the time it happened.
If nothing works
Contact Anthropic. If you believe a specific request was wrongly flagged, say so explicitly. The warnings article above tells you to send the details of your situation and your account information to the address it lists. You can also use Claude Code's /feedback command. Be aware that a report sent with /feedback, or a shared session transcript, sends that conversation, including any code in it, to Anthropic. Remove secrets from anything you paste into a public issue.
Include:
- The exact error text.
- Whether it happened during
/compactor a normal turn. - Whether the triggering text was written by you or by the agent.
- Your Claude Code version and what kind of work the session was doing.
- Whether a fresh session in the same folder hits it too.
Subject: Claude Code false positive: "unable to respond ... appears to violate our Usage Policy"
Hello,
Claude Code returned this error during ordinary work:
"API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy"
Date/time (with time zone):
Claude Code version:
Plan or API account:
What the session was doing:
Did it happen during /compact or a normal turn:
Was the triggering text written by me or by the agent:
Does a fresh session in the same folder also fail:
I believe this request was flagged by mistake. I can share a redacted
transcript if it helps.
Thank you.Common questions
Does this error mean my account is banned?
No. A ban is a separate state with its own appeal screen. This message refuses a single request. Repeated violations can lead to warnings or bans, which is why the account check in Fix 5 is worth doing if the error is frequent.
Why did it block code the agent wrote itself?
We don't know. The reporter saw it on text the agent produced, and Anthropic doesn't publish how the detection works. Once that text is in the history, it may be re-sent with every later request.
Will upgrading Claude Code fix it?
We found no evidence that it will. The refusal comes from the service rather than the local program, so the version matters mainly when you report the problem.
Can I lose my code?
Not from this error alone. It affects the conversation, not your files. Commit regularly and keep notes in the repo, and a failed session costs you only the chat.