[BUG] API Error: Claude's response exceeded the 32000 output token maximum.
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?
Hi,
I just asked Claude Code to implement something relatively hard. After 8 minutes of thinking, there is this error in the Claude Code terminal window:
⎿ API Error: Claude's response exceeded the 32000 output token maximum. To configure this behavior, set the
CLAUDE_CODE_MAX_OUTPUT_TOKENS environment variable.
However it still seems to be thinking (14 minutes now), so it's probably still going. It hasn't given me any feedback of what it's doing or thinking.
✽ Shenaniganing… (11m 35s · ↓ 35.0k tokens · thinking)
Claude Code on PowerShell on Windows Terminal, Windows 11, latest version (updated today). Using Opus 4.6. On the Pro plan currently.
I found a few related issues (other users encountering this issue) but they are all closed or in a different context.
What Should Happen?
No error, or a better explanation.
Error Messages/Logs
API Error: Claude's response exceeded the 32000 output token maximum. To configure this behavior, set the
CLAUDE_CODE_MAX_OUTPUT_TOKENS environment variable.
Steps to Reproduce
I can share my prompt privately if you want to contact me. But I suspect this is reproducible with any prompt that requires long thinking (very complex task).
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.37 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_
139 Comments
Same error here on Opus 4.6 (v2.1.37). I also tried setting
CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000but the 32000 limit remained unchanged. Filed a separate report for that: #24159✍️ Author: Claude Code with @carrotRakko (AI-written, human-approved)
I also find the documentation (https://code.claude.com/docs/en/settings) confusing:
First, this docs page (https://platform.claude.com/docs/en/about-claude/models/overview#model-comparison-table) says Opus 4.6's output limit is actually 128K, so above the max of 64k that the other docs page lists (perhaps this just hasn't been updated for the Opus 4.6 release).
Second, I'm generally confused as a user what to do. It sounds like to make this error go away, I have to set
CLAUDE_CODE_MAX_OUTPUT_TOKENSto 128K. But then increasing this value reduces my context window - so I probably don't want to do that? (I also don't understand why increasing the max output would reduce my context window?).Would be nice to make this clearer/easier for the user.
This is driving me insane. I'm using Codex in the mean time. CC literally unusable right now. It takes 15 minutes to do a single task at the best of times, and we have no visibility into what is happening. I used a packet inspection tool to see if I could figure out where it's getting stuck, and quite often it's just sitting on an open TCP connection waiting for SSE events to come back from Anthropic. In other words, we're just waiting in a queue, forever.
In a more related case, it was sitting there for 12 minutes and 30 seconds to redesign a landing page, all it did was adjust some wording and colors. There's major problems and no one seems to be speaking about it. Genuinely thinking about cancelling my max sub at this point because I can't use CC like this and Anthropic seems to just ignore everyone so I doubt it'll get fixed any time soon.
12 minutes to get to that API error after "Direction confirmed".
I have exactly the same question
Same issue, even changing the variable value seems to do nothing
Is it possible, that the variable
CLAUDE_CODE_MAX_OUTPUT_TOKENSis applied when used API, but not when using subscription?Yeah, it's a major issue. First we had a 128K limit (Max plan), then it shrank to 64K, and now we're slumming it at a measly 32K. I’d get it if claude code or Opus were actually designed to write to new files in bite-sized chunks. But right now, the model is just mindlessly incinerating tokens, utterly failing to save a single large file of its own creation. And to top it off, it repeats this little circus act two or three times, cheerfully flushing my paid subscription tokens down the drain. It’s absolute, unadulterated nonsense. Anthropic, have a heart )
Same issue for me, I tried changing the env var value but it did not seem to fix the issue
<img width="1170" height="267" alt="Image" src="https://github.com/user-attachments/assets/be4081e8-9f3c-431a-8a20-127497d022f6" />
Tokens are just going up in smoke for nothing - please fix this embarrassment.
This urgently needs a fix. This is an issue on all platforms, latest version, occurring in lots of scenarios. At least the error message should be changed to make sense.
Exactly, these very small output limits are completely unusable. I am forced to use Gemini 3 Pro instead as quick saviour.
Many of my flows using latest Opus 4.6 are full of API errors now. Setting max output tokens does not work at all.
Please fix this urgently 🙏
Having the same issue. Asking it to do a small task and it thinks and second guesses itself until the 32000 output token max is reached and then it starts all over again.
I am on the Max 20x plan and I am also experiencing these issues. In the new /fast mode it did eventually complete the task - but burned ~$8 in ~5 minutes. At 4% of my monthly plan cost, it seems like an extreme premium just to be able to complete what was up until recently an "every day" task.
Same here, using Sonnet 4.5
Feels like tokens (and usd) are just getting into a black hole.
Without guidance Opus 4.6 tries to generate huge files in one go. I solved this by explaining the situation and advise it to split the plan items / work packages into smaller pieces and to implement, test and commit each one individually.
This just feels like scam. All the usage got wasted coz of this.
Just hit this while CC tried to build a serialiser from some domain types to mermaid. @nullbio 's observation about the time it takes for stuff that CC usually completed in a few minutes is also accurate. it is minute 20+ at the moment to generate at most a couple of hundred lines of code.
Also seeing this for relatively simple tasks and Sonnet 4.6.
you should retract the usage tokens, if claude couldn't complete the response.
+1 I'm on the pro plan and this just blew through 30% of my 5h limit only to fail with the 32k limit. Retrying in a new session now (I had compacted the previous session then tried to run a big investigation to generate a plan for a bugfix) so it may be related to compacting, dunno. should really get those tokens back because it worked for 13 minutes only to fail and give me absolutely nothing, now I'm having to redo the prompt and waste even more tokens especially as it's a context-fresh session. the issue needs attention!
19 minutes on "Bake" and got charcoal, please verify your smoke detectors.
Claude Code: v2.1.45
Platform: Linux
<img width="1629" height="323" alt="Image" src="https://github.com/user-attachments/assets/8c0f19f1-8f99-4505-b441-b5ae85315fd4" />
Just got bitten by this too. Chomped through the session limit and never generated useful output. That should trigger a refund.
Love this. Now it's 64,000, not 32,000.
Then I restarted the app, and all of a sudden working way faster (and by way faster I mean... Still painfully slow but way faster than molasses).
There's obviously a bug causing degradation of network connections or background processes silently.
Running into the same issue here. Had CC follow a todo list of something relatively complicated and it got stuck in the first step.
⎿ API Error: Claude's response exceeded the 32000 output token maximum. To configure this behavior, set the CLAUDE_CODE_MAX_OUTPUT_TOKENS environment variable.
getting the same error as well
Same error. It churned for 8 minutes and stopped with no feedback and no file-writes. Only when I asked it "what went wrong? Please explain, and complete the task" did it print the error, (before thinking 8 more minutes and finally writing the files).
1) Should print clear and timely error message
2) Should write updates to one file at a time, not try to buffer an unlimited response before writing.
3) Should write what it has to disk (somewhere, anywhere) when the error occurs. Not hold it in memory or discard it.
Bonus Feedback:
Why is ClaudeCode hitting a "response limit" and not just breaking the response into pieces?...
In the last six months, I never got this type of error in VSCode Copilot with Claude Sonnet 4.5 working on production code. However in the first week of testing ClaudeCode in a small sandbox project, here we are.
Why hasn't this problem been solved yet? Can't you have a bit of conscience? How many tokens have I wasted, damn it.
same problem : Yesterday asked it _one question_ in Claude Code Planning mode how it would change an existing script file.
It was reasoning, spawned the error a few times. I've stopped it.
Asked the same question. Did a long time reasoning, no action being taken. Ran out of tokens with again the error a few times, and my session tokens used up.
Today tried again for the same script. It updated the claude.md planning file. Then I asked it to change the code according to it's plan. Same error and burned 75% of my token limit.
Hi I was able to solve this temporarly by asking specific questions, instead of asking to do a lot in one step I started to ask the model to do small tasks and it was able to do those tasks. I would suggest you to try that.
Same, exhausted my tokens for NOTHING.
Same here, waiting a long time for nothing. Maybe it is proposital to make us cast more tokens?
It would be nice if we at least had acknowledgements from Anthropic when they're working on certain things, or we at least know they've seen it. I'll be honest and say that the radio silence on issues makes it feel like they don't care about their customers.
API Error: Claude's response exceeded the 64000 output token maximum. To configure this behavior, set the CLAUDE_CODE_MAX_OUTPUT_TOKENS environment variable.
Im making in other models like Kimi code, because is impossible with opus/anthropic.
Same issue, run out of my tokens to get these hilarious errors.
After a lot of bugs/error:
You've hit your limit · resets 2am (America/Sao_Paulo). It cast all my plan only with bugs/errors.Faced the same problem. Changed the AI model to Opus 4.6 or Haiku 4.5 to get it working. The problem seems to be with the latest Sonnet 4.6 model - which was the default. Hope this issue is fixed soon in Sonnet 4.6.
I only run Opus 4.6 and have this issue all the time.
+1 to this problem. Seems to have been an issue for me the past 2 days. I ask a question that normally would have resulted in a completed action in ~20 seconds but instead now runs for 10 minutes, spits out that error and then goes for another 5 before I finally give up and abort it.
Same behaviour, does it even with different prompts (i.e. has ZERO prompt adherence)
I'm using claude plugin with vscode. Did not face any problem with the default sonnet model till a couple of days back when 4.6 was released. I switched to opus 4.6 today - it worked but after a couple of prompts my token quota was over and not usable. Hope it works when I use it next
``
API Error: Claude's response exceeded the 32000 output token maximum.``I have ended my max plan until these issues (huge delays in responses, and arbitrary burning of tokens) are resolved. The Anthropic restaurant wastes an hour burning your pie and charges you for an empty plate. The solution is clear: store any partial outputs in a temp file and instruct Claude Code to reference it, as you do for some errors already.
Same
+1 Claude seems to be completely broken now only a few days after I upgraded to Max. It just can't complete any work without running into this error yet burns tokens in the process.
Worse, this was working fine with a Claude session I had open until yesterday over the last week, it's only now I've restarted and started a new fresh session that it no longer works.
Claude is super slow, broken, and makes mostly mistakes... has there been a wrong update of the models?
I have the same issue, i recomond when you ask any requests, make it in a few different messages, It is working well. as much possible try to get one part of task in one message and get a summary then open another message and same, sometimes because of heavy loading we can get problem even i am in max memebership.
Same issue. Following this thread. Unable to locate any settings.json file locally. No idea where to find such a file on cloud, but sounds like it wouldn't make a difference.
Like others, I feel like Claude is burning tokens with each attempt that ends in failure. This apperas seem to be a bug, not a configuration issue.
Good ol Anthropic. Do they actually have software engineers anymore or do they outsource their work to Haiku ? Leaning towards Haiku.
BILLIONS OF DOLLARS in the bank but can't go through a release without major issues.
same here in planning mode, waiting for 20 minutes
<img width="3484" height="2064" alt="Image" src="https://github.com/user-attachments/assets/9081ec8f-3579-44be-a228-5e1ca33821f9" />
Seems changing the thinking effort to low, OR switching back to the old models can fix the problem of the models to over reason.
~\\.claude\\settings.json
{
"model": "sonnet",
"thinkingEffort": "low"
}
or env vars to set to old models:
C:\ > set ANTH
ANTHROPIC_DEFAULT_OPUS_MODEL = "claude-opus-4-5-20251101"
ANTHROPIC_DEFAULT_SONNET_MODEL = "claude-sonnet-4-5-20250929"
ANTHROPIC_DEFAULT_HAIKU_MODEL = "claude-haiku-4-5-20251001"
I don't pay $200 a month for Claude to operate at low effort. Unacceptable, Anthropic.
This is awesome. Burned my entire session limit on this error and got nothing done.
I have the same issue and i am dissatisfied with the handling of it.
This fucking sucks, I just bought a yearly plan on the reccomendation of a friend, fired it up, and it's broken haha. haven't been able to do anything with it
Probably different issue with what is reported above but I faced this issue twice ( with glm-4.7 model ) when claude code (v2.1.50) enters into a loop where it continuously tries to do the same thing over and over, which was visible in detailed transcript (ctrl+o) for a short period of time, where detailed transcript for the looping output vanished after giving an interrupt.
I wonder when some tech influencers are going to start talking about this giant elephant in the room: Anthropics communication in regards to bugs/issues.
How do we know when they're working on something? How do we know that they've even seen this? Or should we keep screaming from the void?
This system is not working at all. No issue assignments to Anthropic team members, no comments from them on any issue on Github, no management of the GH issues list. They're alienating their user base and seemingly do not care.
I first had this issue while trying out my local model (which is supported by Claude as a feature) so I tought it was maybe me that had done something wrong, but even the variable setting doesn’t work :/
And then this also happened on my pro account (but not always? Today I managed to get Claude work again on 4.6 sonnet when working with a different task)
I'm hitting this too. Sounds like something @bcherny would want to be aware of (just listened on Lenny's podcast and he supposedly fixes bugs "in minutes"). This would sure be a nice one to tackle for the users.
Is this somehow related?
https://x.com/anthropicai/status/2025997928242811253?s=46
Maybe Anthropic decided to limit all users in case of preventing attacks
Just updated to the latest version of the Claude Code CLI and ran into this myself.
https://github.com/anthropics/claude-code/issues/26224
Running into this myself - it's exceedingly frustrating because there's just no feedback as to what is going wrong.
Happened to me, just interrupted with Esc, then prompted "continue", and everything was fine. Basically splitting into two outputs. CC should handle this automatically, or see the end of the output token limit approaching and handle it gracefully.
Same issue here...
Same issue here? What's wrong?
same here
I guess we get no response from Anthropic. In the meantime, Claude Code has burned my 5 hours session in two failed responses, each of which took over 30 minutes to fail.
<img width="1231" height="373" alt="Image" src="https://github.com/user-attachments/assets/a43077af-8e0b-43e3-9f06-35f0be80423e" />
I agree that if there are technical limitations and a response can't be provided, the tokens wasted should not be applied. It's not the same as if the user is misusing the agent but rather that the agent failing to respond is costing the user money. This makes no sense whatsoever.
Same problem here, could anyone clarify if there’s an option to increase the CLAUDE_CODE_MAX_OUTPUT_TOKENS limit through configuration?
<img width="521" height="555" alt="Image" src="https://github.com/user-attachments/assets/8a3b3540-0263-4782-b812-42d8b7425a2b" />
I’m experiencing the same issue here. I’m not sure if there’s a way to upvote this.
Just ran into the same issue.
Same here. Switching the model to opus 4.5 solved it for me.
Switched to Codex plugin for VSCode after a week of struggle with Claude Sonnet 4.6 and getting work done at a much faster pace. Stopping my monthly subscription of Claude pro. Its goodbye unless I hit a bottleneck with Codex - fingers crossed.
I also encountered this, especially when using Sonnet 4.6. It's extremely frustrating.
a have the same issue but event with website cloud version of claude code. It spent all 5 hour session without result with this error
Same issue. 40 minutes in and still thinking.
36 minutes, 46 seconds for me.
I ran into this on Windows, but switched to using the cli on Ubuntu and in
Antigravity on Ubuntu and haven't run into it again.
On Fri, Feb 27, 2026, 08:44 drewbug @.***> wrote:
I have the same issue. Switching to Opus 4.6 seems to have improved it for now.
Same issue here
There's an env var that raises the output ceiling beyond 32k — and a
thinkingEffortsetting that frees up output space by reducing extended thinking tokens. Both approaches documented here: https://cacheoverflow.dev/blog/OihAEBhpI have been seeing the same error too for 2 days.
Claude Code is unusable because of this now.
This seems to be a recent thing (reddit agrees), like within the last week or so.
Some people are saying "any prompt with a complex task", while other are saying "even simple tasks". I think what is complex vs what is simple is highly subjective.
I've seemingly noticed an improvement in the quality of the responses. It feels to me like Claude has had a recent update, which has improved it's "reasoning" ability, but with quite extreme increase in time & cost.
(* "reasoning", LLMs cannot actually reason, they can only do System One)
Therefore I suggest: Clear simple modes:
In my company, we have a lot of complex algorithms, and waiting for Claude to give a (pretty nearly) correct solution in 30 minutes is WAY MORE VALUE than a completely wrong answer in 30 seconds. So I don't think this thread is a bug, but rather an "immature feature".
I think the key to a fair and transparent cost model is that when Claude fails to give an answer (either user cancels, or hits some limit) then we shouldn't be charged.
I'd also love to see some comms around this from Anthropic, like a YouTube video that explains why some prompts cause Claude to burn through tokens - like what is it actually doing under the hood? Because it doesn't actually output 32k tokens (in the form of code/response) - those tokens are in intermediate thought steps?
Interesting stuff.
I can't get past this error at all with my project now. It's only 10k LOC and every time I prompt it to fix a (pretty easy) bug, it just hangs for 10+ minutes and then gives this stupid useless CLAUDE_CODE_MAX_OUTPUT_TOKENS error. I've already hand-written the bug fix and Claude is still hung. Restarted conversations, compacted, updated CLAUDE.md to tell it not to read full file contents. Nothing works.
If it helps anyone I haven't had this bug since just after I commented last time. I've been purely using Opus 4.6 before, during, and after this bug so I don't think model selection matters per-se. What I did do is simply explain to Claude that it has this bug and so will need to think differently and perhaps break things up to get past it and this worked a charm. Once I got past the bug it hasn't resurfaced at all and I've been using the same session ever since (over a week).
Maybe I just got lucky ever since, but it's worth a try - just make Claude aware of the problem. If it pops up, interrupt Claude and tell it to pay attention to the error it received and try a different approach.
FWIW, I finally managed to get past this (for now) by adding this to CLAUDE.md:
IMPORTANT
And then I asked it to refactor one of my very large unit test files into 4 separate files. This unit test had been complaining that it had too many tokens to read previously, which was probably contributing to this error.
I faced this issue to across Opus and Sonnet. Could try turning off "thinking mode", this helps for me.
New Claude user, just signed up to a pro subscription to evaluate claude code. First issue, auth outage today, so delayed in setting up VSCode extension. Finally got going, intermittent long thinking times and then repeated CLAUDE_CODE_MAX_OUTPUT_TOKENS errors in the chat, no partial responses or anything helpful. Then things worked again.
I will try the suggested settings.
<rant-to-vent>Reached some subscription limit on day 1! Added funds for extra usage. Frustrating first experience, tbh.
Reached out to support (bot), which tried to explain to me why I should pay, as work had been done by their API and tokens have been consumed.
They are sending my inquiry off to a human.
</rant-to-vent>Yeah, this just happened to me, seems my issue is linked. Claude was running for about 25 minutes, no output, but used my remaining 30% usage limit, so i'm done until 11pm now. - as mentioned in my issue. i gave codex the same problem via the copilot cli and it fixed it in less than 5 minutes
Happening a lot lately. I think the model is just thinking itself to death
This is happening with Sonnet 4.6 with medium effort (not High) for some reason
I don't know if it helps, but this worked for me:
I've had this issue too on Linux with either the env set to 64 or 128. Adjusting behaviour in the claude.md is not a solution for my use case (complex reverse engineering and binary exploitation).
This happens for subagent output as well as the main opus/sonnet if the limit is reached.
This has been happening to me since the day Opus 4.6 was announced. It's driving me insane.
This is happening to me non-stop on Claude Code as of today...
Just had this happen, I just waited a bit and it continued by itself. Will report back if the resulting work was more flawed than expected.
I've been encountering this bug too for the last 12 hours both with Opus 4.6 and Sonnet 4.6. Changing the environment variable didn't have any effect. It's always massively overthinking, right now it is unable to fix and understand its own code from yesterday.
Omg, it became unusable.
The same thing happened to me twice in 2 different sessions in a row. Now seems fine.
I have one project repo where I can reliably reproduce this behaviour in Claude Code/VS Code Extension. Unsure if it's corrupted context or something but I can't tell Claude to start any task in this project without thinking forever, getting CLAUDE_CODE_MAX_OUTPUT_TOKENS errors, and eventually exhausting my limit. Started happening as of a few days ago.
Sonnet-4-6 has been regularly running into this over the last week. Intermittent though and sometimes it is able to recover on it's own.
Claude 4.6 does not respect the
CLAUDE_CODE_MAX_OUTPUT_TOKENSenvironment variable.When a response exceeds the default 8,000 token limit, the model retries repeatedly,
consuming tokens on each failed attempt without ever delivering output.
When generating a response that exceeds 8,000 tokens, Claude Code:
API Error: Claude's response exceeded the 8000 output token maximumThe
CLAUDE_CODE_MAX_OUTPUT_TOKENSvariable is not respected by the model, so raisingit has no effect. Tokens are consumed by every failed retry.
## Evidence — Recent occurrences found in JSONL transcripts
| Session | Date | Failed attempts |
|---|---|---|
| Session 36f74999 | 06/03/2026 | 22 |
| Session 551e8d2a | 01/03/2026 | 10 |
| Subagent (session 36f74999) | 06/03/2026 | 2 |
| Subagent (session 551e8d2a) | 01/03/2026 | 1 |
| Total | | 35 |
All 35 occurrences confirmed by grepping local JSONL transcript files for
"exceeded the 8000 output token".## Impact
35 API calls consumed tokens and produced no usable output. This represents a
meaningful cost to the user with zero value delivered.
I'm hitting this right now. On Claude Code Desktop for macOS.
I'm not even sure where I"m supposed to configure this setting. There is nothing in the settings of the app.
I could set an environment variable, but I think that would make sense if I were using the terminal Claude CLI, which I'm not here. My guess is that the desktop app doesn't see this environment variable.
echo 'export CLAUDE_CODE_MAX_OUTPUT_TOKENS=128000' >> ~/.zshrc && echo "Added to ~/.zshrc" just add this command in terminal and after adding this command do this in your terminal source ~/.zshrc
@venkateshdasarigt Again, note that I am using the Claude Desktop app, for MacOS. Not the CLI.
yes that works try it out on your root terminal
The first url, the doc removed this settings in the odc
The fix is in the error message itself — set the environment variable:
The default is 32,000 tokens. For complex tasks with Opus 4.6, especially ones requiring large code generation or multi-file changes, 32K can be hit. 128K gives plenty of headroom.
Quick test without permanent change:
Note: Higher output token limits mean Claude can produce longer responses, which uses more of your rate limit per response. If you're on Pro with Opus, this is a tradeoff — fewer long responses vs. more short ones within your rate window.
Nope, this is not the fix.
Let me tell you why:
API Error: Claude's response exceeded the 32000 output token maximum. To configure this behavior, set the CLAUDE_CODE_MAX_OUTPUT_TOKENS environment variable.
(Usage now at 58%)
(Usage now at 61%)
Final result: 4% usage could have been spent on writing if Claude would have written in chunks right away, or had calculated the (very sensible value of 32k max output tokens) as a blocker for writing in one-go
Instead: 61% usage spent on several attempts, trying to tell me that it's not stuck.
Problems:
Calculating est. token output is zero cost. Claude should not ignore this value before attempting write.
<img width="1787" height="947" alt="Image" src="https://github.com/user-attachments/assets/3b63860a-c581-4496-843b-2ecc1957c5ed" />
Agree, see my post.
Final: Consumed 62% for what would have been a 4% of 5h usage (Pro).
So at normal rates (in promo 2x now) that would have been (124% vs what could have been 8%).
I reverted Claude Code to 4.5 a few weeks ago and have not seen any issues since.
~/.claude/settings.json:I'd love to see what 4.6 has to offer, but at least 4.5 behaves predictable and reasonable.
The config value is for CLAUDE_ (e.g. all models, incl Sonnet, inc 4.5, inc. haiku).
It could be the case that Opus 4.5 does respect the value, but it's not Opus specific.
My experience today was with Sonnet 4.6.
So either the "don't care about this config var" is baked into both values, or a client instruction set (claude code) on top of it is not enforcing it. Which means only a Claude Code specific version reversion could possibly mitigate it.
You probably haven't seen it, because it hasn't happened.
Unless you can find some value in the logs somewhere that says that it had a >32k token output + knowing the actual ENV var value being set.
That would be valuable information.
/tmp/gh-comment-24055.md
<img width="516" height="176" alt="Image" src="https://github.com/user-attachments/assets/e1354f4c-703c-421a-8f85-675f1ad017fc" />
Now im getting this error everytime.
Same here, same API error was repeated 4 times and wasted the entire 5h pro usage.
/tmp/gh-comment-24055.md
try
/clearand then retry. It'll likely reset and your prompt goes through.Hi Steve,
Thank you for reaching out to our team.
We first want to provide you with our sincere apologies for the delay. We are working hard as a team to restore our typical response times. Also, thank you for taking the time to document your concerns regarding your experience with Claude.ai.
We understand how frustrating this situation must have been, especially given the ways of impact you've described.
We take all feedback about Claude's performance and responses seriously and I want to address your concerns directly.
I reviewed internally for any known issues that may be affecting usage in the month of March.
I can confirm that there have been a few internal instances that we have publicly post about and update here on our status page - including the bugs you have highlighted in your above email.
It appears from your ticket these may have influenced your sessions during the time period that you have reported on & the time frame in which your ticket was opened.
These issues have now been resolved and should not be affecting you any longer.
While we cannot provide financial compensation, reset usage limits or reinstate usage credits for instances where there has been service and output degradation, please know that we value your feedback.
We have recorded this outcome and feedback internally which will contribute to helping us in our ongoing efforts to improve Claude's performance and safety.Again, we appreciate you bringing this to our attention and remain committed to developing and improving our model's quality and accuracy.
Kind regards,
Isn't that lovely, they value my feedback. Not in a monetary value, but they get something out of it.
From "Continue" after 5h reset to API Error, 78% of current session was used! Am I using superpowers' brainstorming wrong?
This was fixed in v2.1.42 — CLAUDE_CODE_MAX_OUTPUT_TOKENS is now respected up to 64K for Opus 4.6 instead of being clamped to 32000. If you're still seeing this in the latest version, please comment with your version and repro and we'll reopen.
In my case I was using Sonnet 4.6, so we can infer from your post that for Sonnet 4.6 the issue remains open?
If you ask Sonnet or Opus explicitly and beforehand to write in chunks when the output is expected to exceed a certain threshold, they do just that. This seems like behavior that warrants enforcement into the model itself, rather than leaving it up to the user to decide.
I basically have the same issue as @milankubin , using Sonnet 4.6.
Sadly, I have the same issue too. Was using Sonnet 4.6.
Issue still present in Sonnet 4.6 in code version 2.1.128. Errored out after it spent 35 minutes and it decided the first response would be 105K tokens. It really should be more cognizant of its max output tokens as default behavior.
encountered same issue as @milankubin using Sonnet 4.6,
claude version 2.1.129
I'm having the same issue:
After waiting 30 minutes, this error appears. When I try again, the same error appears, and then the rate limit is applied... So no way to use it.
Wow so this occurred _even when_ the following was added to my CLAUDE.md globally and at the project level:
It gets to 32k, pauses then continues, gets to 64k, pauses then continues past 100k. What the hell else am I supposed to do?
Strange, when tested I did see Opus do exactly what I told it, but this was explicitly prompt injected and then later in the session inferred ("since this is going to be a large write, I'll write it in chunks as per instruction" something akin) applied.
I do get a little anxious still by the behavior of the models (Sonnet too), it likes to gather a whole lot in batch before doing single writes. If nearing some form of limit (or if it pertains to a single file), this can result in this problematic behavior.
Either it can't write all before a session limit, loses cache, then loads all history back again (easy 20% instant extra use on next 5h session for Pro) or .. in case of a single large write this will lead to this behavior.
Now I don't have this issue a lot, since I try to keep individual files small per convention (always a good idea), for large plan files it can certainly become a problem.
Just have to be mindful while instructing, or create some tooling around it. Like some inspector agent to pre-inspect files and calculate est tokens on full rewrites, something like that, and catch them periodically. Maybe add some docstring comments to them or AGENTS.md in the directory.
I have the same issue as of today. I've never seen this error before. Opus 4.7 plan mode
It just burnt all my tokens generating something then refused to output it... fuming.
same issue today after updating to v2.1.139
What an indictment of this industry. _"We've wasted your time. We've wasted our (server's) time. We've wasted your money. We've (probably) wasted our money. And there's nothing to show for it."_ The wastefulness is becoming unbearable.
Extremely disappointed. Despite purchasing the pro plan for faster task completion, I encountered the same persistent error across multiple platforms (Claude native app, VS Code terminal, Claude VS Code extension, and Claude desktop app). This resulted in a significant loss of time, money, tokens, and momentum. The error message should clearly indicate the token restriction preventing large output files and suggest optimal solutions.
Same as v2.1.145
I had better results adding that to the prompt "split it into 3 parts so token limit of 32000 doesnt exceed"
Please remove the
platform:windowslabel as this issue has nothing to do with Windows.I'm using Windows, and I just ran into a problem. I'm looking for a solution.
The 32000 output token max is frustrating. Usually happens when Claude tries to dump massive amounts of generated content.
Workarounds:
The root issue is often that input context is already huge (from prior command output), so Claude has less room for output.
Context management tip: The 32K output limit often gets hit when Claude is working with large tool outputs already in context - verbose build logs, test suites, etc. compound the problem.
issue still exists in v2.1.199 with windows