[Bug] Claude Code is not working since Sept 30 | Anthropic API Error: Unexpected Usage Policy Violation Blocking Existing Session
Bug Description See I have been working with Claude and same files have been worked by Claude since last 50-60 days
Today, I have scheduled for a version release and at morning (IST) - So many changes were done. During the last phase of that - Claude got stuck with a json error(corrupted ? - if its corrupted, claude only edited and added the content too)
I waiited for 6hrs.
Evening -i tried again - thinking it might be a glitch in claude nand would get fixed. DIdnt get ficxded.
Tried multiple session restarts,
Tried open new claude and used /resume - it didnt worked
Deleted claude cache and /tmp content of claude as per claude web suggestion.
Finally and nothinhg worked, I tried a new session - its double work as I have to start over and my plans have to be changed and blogs have been moved out now
Now, it keeps saying below error
⎿ API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (https://www.anthropic.com/legal/aup). Please double press esc to edit your last message or start a new session for Claude Code to assist with a different task.
Chat with claude help bot in website told that there is a ongoing issue. I waited . WHen the status of that error ius shown as fixed. I tried again.
Still same issue. I cna see other people also reporting teh same in twitter.
I am, a max user. Atleastr value for money.
And please show genuine errorr message at-least - instead of this policy violation - How can that happen - when claude itself had generated the readme file content?
Environment Info
- Platform: darwin
- Terminal: iTerm.app
- Version: 1.0.102
- Feedback ID: 6b82c8d2-86a5-4b28-b8a0-faa5d2c546fb
Errors
[{"error":"RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded\n at Socket.onChildStdout (node:child_process:481:14)\n at Socket.emit (node:events:518:28)\n at Socket.emit (node:domain:489:12)\n at addChunk (node:internal/streams/readable:561:12)\n at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n at Readable.push (node:internal/streams/readable:392:5)\n at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)","timestamp":"2025-09-30T15:03:01.271Z"},{"error":"Error: Failed to install new version of claude: npm error code ENOTEMPTY\nnpm error syscall rename\nnpm error path /Users/sreenath/.nvm/versions/node/v22.16.0/lib/node_modules/@anthropic-ai/claude-code\nnpm error dest /Users/sreenath/.nvm/versions/node/v22.16.0/lib/node_modules/@anthropic-ai/.claude-code-ujU140Dv\nnpm error errno -66\nnpm error ENOTEMPTY: directory not empty, rename '/Users/sreenath/.nvm/versions/node/v22.16.0/lib/node_modules/@anthropic-ai/claude-code' -> '/Users/sreenath/.nvm/versions/node/v22.16.0/lib/node_modules/@anthropic-ai/.claude-code-ujU140Dv'\nnpm error A complete log of this run can be found in: /Users/sreenath/.npm/_logs/2025-09-30T15_03_02_547Z-debug-0.log\n at MG1 (file:///Users/sreenath/.nvm/versions/node/v22.16.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1973:393)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async file:///Users/sreenath/.nvm/versions/node/v22.16.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:3572:12080","timestamp":"2025-09-30T15:03:02.712Z"},{"error":"Error: Failed to install new version of claude: npm error code ENOTEMPTY\nnpm error syscall rename\nnpm error path /Users/sreenath/.nvm/versions/node/v22.16.0/lib/node_modules/@anthropic-ai/claude-code\nnpm error dest /Users/sreenath/.nvm/versions/node/v22.16.0/lib/node_modules/@anthropic-ai/.claude-code-ujU140Dv\nnpm error errno -66\nnpm error ENOTEMPTY: directory not empty, rename '/Users/sreenath/.nvm/versions/node/v22.16.0/lib/node_modules/@anthropic-ai/claude-code' -> '/Users/sreenath/.nvm/versions/node/v22.16.0/lib/node_modules/@anthropic-ai/.claude-code-ujU140Dv'\nnpm error A complete log of this run can be found in: /Users/sreenath/.npm/_logs/2025-09-30T15_08_11_851Z-debug-0.log\n at MG1 (file:///Users/sreenath/.nvm/versions/node/v22.16.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1973:393)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async file:///Users/sreenath/.nvm/versions/node/v22.16.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:3572:12080","timestamp":"2025-09-30T15:08:12.236Z"}]
⎿ API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (https://www.anthropic.com/legal/aup). Please double press esc to edit your last message or start a new session for Claude Code to assist with a different task.
claude-doctor ⎿ API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (https://www.anthropic.com/legal/aup). Please double press esc to edit your last message or start a new session for Claude Code to assist with a different task.
⎿ API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (https://www.anthropic.com/legal/aup). Please double press esc to edit your last message or start a new session for Claude Code to assist with a different task.
claude-doctor ⎿ API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy (https://www.anthropic.com/legal/aup). Please double press esc to edit your last message or start a new session for Claude Code to assist with a different task.
Since there is no update, I uninstalled and took latest v2 version. But same issue:
⏺ Let me continue reading more key files to understand the complete architecture:
⎿ API Error: Claude Code is unable to respond to this request, which appears to
violate our Usage Policy (https://www.anthropic.com/legal/aup). Please double
press esc to edit your last message or start a new session for Claude Code to
assist with a different task. If you are seeing this refusal repeatedly, try
running /model claude-sonnet-4-20250514 to switch models.
⎿ Error reading file
⎿ API Error: Claude Code is unable to respond to this request, which appears to
violate our Usage Policy (https://www.anthropic.com/legal/aup). Please double
press esc to edit your last message or start a new session for Claude Code to
assist with a different task. If you are seeing this refusal repeatedly, try
running /model claude-sonnet-4-20250514 to switch models.
⎿ API Error: Claude Code is unable to respond to this request, which appears to
violate our Usage Policy (https://www.anthropic.com/legal/aup). Please double
press esc to edit your last message or start a new session for Claude Code to
assist with a different task. If you are seeing this refusal repeatedly, try
running /model claude-sonnet-4-20250514 to switch models.
⎿ Read 372 lines (ctrl+o to expand)
⎿ Read 29 lines (ctrl+o to expand)
⎿ API Error: Claude Code is unable to respond to this request, which appears to
violate our Usage Policy (https://www.anthropic.com/legal/aup). Please double
press esc to edit your last message or start a new session for Claude Code to
assist with a different task. If you are seeing this refusal repeatedly, try
running /model claude-sonnet-4-20250514 to switch models.
⎿ API Error: Claude Code is unable to respond to this request, which appears to
violate our Usage Policy (https://www.anthropic.com/legal/aup). Please double
press esc to edit your last message or start a new session for Claude Code to
assist with a different task. If you are seeing this refusal repeatedly, try
running /model claude-sonnet-4-20250514 to switch models.
⎿ Read 367 lines (ctrl+o to expand)
⎿ Read 156 lines (ctrl+o to expand)
⎿ API Error: Claude Code is unable to respond to this request, which appears to
violate our Usage Policy (https://www.anthropic.com/legal/aup). Please double
press esc to edit your last message or start a new session for Claude Code to
assist with a different task. If you are seeing this refusal repeatedly, try
running /model claude-sonnet-4-20250514 to switch models.
⎿ API Error: Claude Code is unable to respond to this request, which appears to
violate our Usage Policy (https://www.anthropic.com/legal/aup). Please double
press esc to edit your last message or start a new session for Claude Code to
assist with a different task. If you are seeing this refusal repeatedly, try
running /model claude-sonnet-4-20250514 to switch models.
> /doctor
@hackyon-anthropic
I just started getting this same behavior this morning for no reason. Not able to understand why either. Here is the stream:
in the previous site (../learn) when we loaded coarses, we also created links to play.golang.org so
we could click from our slides and see the code and share it from that domain. There is an api that
allows us to do this (look at the code in the last site where we did this). I need that to also be
done in this site again as part of the coarse loader if it isn't already done, and ensure those links
are present in the database and up to date. Then, on the slides page like this
(http://localhost:9000/app/courses/2025-gophercon-testing/modules/testing-net#slide-4) you need to add
the `play` button that will open a new tab to that link. that button should be placed next to the
expand code button. Also, the expand code button shoul be the `expand` icon instead of the full
workds. create a todo list. be sure to look at what we used to do, but feel free to improve on it as
well. ultrathink
⏺ I'll help you implement the play.golang.org functionality. Let me first create a todo list, then
investigate the previous implementation.
⏺ Search(pattern: "**/*play*.go", path: "../learn")
⎿ Found 0 files
⏺ Search(pattern: "**/courseloader/*.go", path: "../learn")
⎿ Found 0 files
⏺ Read(pkg/courseloader/parser.go)
⎿ Read 206 lines (ctrl+o to expand)
⏺ Read(pkg/database/schema/schema.sql)
⎿ Read 138 lines (ctrl+o to expand)
⏺ Bash(ls -la ../learn 2>/dev/null | head -20)
⎿ total 902664
drwxr-xr-x 3 corylanou staff 96 Aug 3 2022 _gopherguides-development
drwxr-xr-x 38 corylanou staff 1216 Mar 8 2025 _training
… +17 lines (ctrl+o to expand)
⏺ Search(pattern: "play\.golang", path: "../learn")
⎿ Found 6 files (ctrl+o to expand)
⏺ Search(pattern: "playground", path: "../learn")
⎿ Found 47 files (ctrl+o to expand)
⏺ Read(~/projects/gopherguides/learn/remark/code_file.go)
⎿ Read 234 lines (ctrl+o to expand)
⏺ Read(~/projects/gopherguides/learn/templates/modules/_code_file.plush.html)
⎿ Read 34 lines (ctrl+o to expand)
⏺ Search(pattern: "code.*slide|slide.*code")
⎿ Found 16 files (ctrl+o to expand)
⏺ Read(pkg/courseloader/loader.go)
⎿ Read 369 lines (ctrl+o to expand)
⏺ Search(pattern: "**/remark/**/*.go")
⎿ Found 36 files (ctrl+o to expand)
⏺ Read(pkg/views/courses/module.templ)
⎿ Read 301 lines (ctrl+o to expand)
⏺ Read(remark/code_file.go)
⎿ Read 234 lines (ctrl+o to expand)
⏺ Search(pattern: "NewCodeFile|postToPlay", output_mode: "content")
⎿ Found 7 lines (ctrl+o to expand)
⏺ Read(remark/slide_parser.go)
⎿ Read 30 lines (ctrl+o to expand)
⏺ Search(pattern: "code-section|file-toggle|code-whole", output_mode: "content")
⎿ Found 74 lines (ctrl+o to expand)
⏺ Read(app/platform/member/content.go)
⎿ Read 60 lines (ctrl+o to expand)
⎿ Updated app/platform/member/content.go with 15 additions and 3 removals
218 bb.WriteString(template.HTMLEscapeString(cf.Section))
219 bb.WriteString(`</code></pre>`)
220
221 - // File source and expand button
221 + // File source and action buttons
222 bb.WriteString(`<div class="flex items-center justify-between mt-2 text-sm">`)
223 bb.WriteString(fmt.Sprintf(`<p class="text-gray-600 m-0">file: %s</p>`,
template.HTMLEscapeString(cf.Source)))
224
225 + // Buttons container
226 + bb.WriteString(`<div class="flex gap-2">`)
227 +
228 // Only show expand button if section differs from full code
229 if strings.TrimSpace(cf.Section) != strings.TrimSpace(cf.Code) {
230 - bb.WriteString(fmt.Sprintf(`<button class="file-toggle bg-blue-600 text-white px-3
- py-1 rounded hover:bg-blue-700" data-sid="%s">`, sid))
231 - bb.WriteString(`<i class="fa fa-expand" aria-hidden="true"></i> Expand Code`)
230 + bb.WriteString(fmt.Sprintf(`<button class="file-toggle bg-blue-600 text-white px-3
+ py-1 rounded hover:bg-blue-700" data-sid="%s" title="Expand Code">`, sid))
231 + bb.WriteString(`<i class="fa fa-expand" aria-hidden="true"></i>`)
232 bb.WriteString(`</button>`)
233 }
234
235 + // Add play button if PlayLink exists
236 + if cf.PlayLink != "" {
237 + playLink := strings.TrimSpace(cf.PlayLink)
238 + bb.WriteString(fmt.Sprintf(`<a href="%s" target="_blank" class="bg-green-600
+ text-white px-3 py-1 rounded hover:bg-green-700 inline-flex items-center" title="Open
+ in Go Playground">`, template.HTMLEscapeString(playLink)))
239 + bb.WriteString(`<i class="fa fa-play" aria-hidden="true"></i>`)
240 + bb.WriteString(`</a>`)
241 + }
242 +
243 bb.WriteString(`</div>`)
244 bb.WriteString(`</div>`)
245 + bb.WriteString(`</div>`)
246
247 // Code whole (full file) - initially hidden
248 bb.WriteString(fmt.Sprintf(`<div class="code-whole" id="whole-%s" style="display:
none;">`, sid))
⎿ Updated app/platform/member/content.go with 18 additions and 3 removals
252 bb.WriteString(template.HTMLEscapeString(cf.Code))
253 bb.WriteString(`</code></pre>`)
254
255 - // File source and collapse button
255 + // File source and action buttons
256 bb.WriteString(`<div class="flex items-center justify-between mt-2 text-sm">`)
257 bb.WriteString(fmt.Sprintf(`<p class="text-gray-600 m-0">file: %s</p>`,
template.HTMLEscapeString(cf.Source)))
258 - bb.WriteString(fmt.Sprintf(`<button class="file-toggle bg-blue-600 text-white px-3
- py-1 rounded hover:bg-blue-700" data-sid="%s">`, sid))
259 - bb.WriteString(`<i class="fa fa-compress" aria-hidden="true"></i> Collapse Code`)
258 +
259 + // Buttons container
260 + bb.WriteString(`<div class="flex gap-2">`)
261 +
262 + // Collapse button
263 + bb.WriteString(fmt.Sprintf(`<button class="file-toggle bg-blue-600 text-white px-3
+ py-1 rounded hover:bg-blue-700" data-sid="%s" title="Collapse Code">`, sid))
264 + bb.WriteString(`<i class="fa fa-compress" aria-hidden="true"></i>`)
265 bb.WriteString(`</button>`)
266 +
267 + // Add play button if PlayLink exists
268 + if cf.PlayLink != "" {
269 + playLink := strings.TrimSpace(cf.PlayLink)
270 + bb.WriteString(fmt.Sprintf(`<a href="%s" target="_blank" class="bg-green-600
+ text-white px-3 py-1 rounded hover:bg-green-700 inline-flex items-center" title="Open
+ in Go Playground">`, template.HTMLEscapeString(playLink)))
271 + bb.WriteString(`<i class="fa fa-play" aria-hidden="true"></i>`)
272 + bb.WriteString(`</a>`)
273 + }
274 +
275 bb.WriteString(`</div>`)
276 bb.WriteString(`</div>`)
277 + bb.WriteString(`</div>`)
278 }
279
280 // renderMarkdown converts markdown to HTML using GitHub-flavored markdown
⏺ Search(pattern: "font-awesome|fontawesome|fa-|awesome", output_mode: "content", head_limit: 20)
⎿ Found 20 lines (ctrl+o to expand)
⏺ Search(pattern: "cdn.*font|font.*awesome", output_mode: "content")
⎿ Found 54 lines (ctrl+o to expand)
⎿ API Error: Claude Code is unable to respond to this request, which appears to violate our Usage Policy
(https://www.anthropic.com/legal/aup). Please double press esc to edit your last message or start a new
session for Claude Code to assist with a different task. If you are seeing this refusal repeatedly,
try running /model claude-sonnet-4-20250514 to switch models.
I can assure you nothing I'm doing is against the TOS.. if it is, then no developer can use this. I'm working literally with all code that I wrote myself.
same (there is no porn in my global.css i promise)
Happened multiple times to me with 4.5
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
See , it kept coming multiple times and several people had reported it too in social media - tweets, reddit as well.. But no one from Anthropic was interested to fix this. They had even taken issues which got created after this too.
Now, you want to autoclose - do it. Thanks for not checking
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.