[BUG] When context remaining is less than 10% (i.e. 70% usage), Claude Code stops working with an API timeout error.
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?
Claude Code version: 2.0.72
Environment: Claude Code launched in terminal within VSCode
- When context remaining goes less than 9%, i.e. token usage is over 70%, Claude Code starts erroring out with an error: "Request timed out. Check your internet and proxy settings" followed by a retry loop of 10-30 attempts.
- Once the retry loop is complete, the "Request Timed Out" is replaced with another error that says: "API error. Connection error"
- From the time the Request Timed Out error comes up, the UX also degrades significantly. Typing any messages feels sluggish as keystrokes take time to render on the screen
Impact: Unfortunately, this leaves users with sessions that weren't handed off correctly.
Potential workaround: I observed that if I start a new session, exit out of Claude Code. Then start it again and resume the problematic session - I can at least complete some steps like handing off the session. However, I have tried this just once, so it may be anecdotal.
What Should Happen?
As with previous versions, the context remaining message should continue to show and Claude Code should continue the implementation or conversation without timeout errors.
Error Messages/Logs
1. Request Timed Out. Check your internet connection and proxy settings
2. API Error. Connection error.
Steps to Reproduce
- Launch a new Claude Code session
- Start working according to the plan and the ToDo List
- Continue working until the context remaining goes less than 10%, i.e. greater than 70% tokens used
- Observe the timeout error and then the api connection error after automated retry is complete
- Exit the session, start Claude code once more and resume the session again
- Send a message - observe that the timeout error appears once again and is then replaced with the api connection error after automated retry is complete
- Also observe the sluggishness in rendering of keystrokes on the UI
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.0.70 & 2.0.71
Claude Code Version
2.0.72
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
<img width="905" height="521" alt="Image" src="https://github.com/user-attachments/assets/a6eb77d3-5532-4a21-965f-16633b6f2bda" />
30 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
While these issues are all happening with vscode, they seem to be random corruption. In My case however, I have observed over 4 sessions that this consistently happens only after context remaining is less than 10%. Two sessions where I did not exceed 70% token consumption worked well. Two sessions where I exceeded 70% token usage gave this issue. I've also never faced this issue with a previous version of Claude Code.
I have this exact same problem. Claude seems to be stuck in an infinite loop, as even without responding or processing requests, it loads the system by 20%. Apparently, this is a bug in one of the Automatic Conversation Compression modules. Could you please also tell me if I open a new conversation, the problem won't occur, right? And how do you run your version of Claude, on the server or on your local PC? Using the command IS_SANDBOX=1 claude --dangerously-skip-permissions?
Same here
<img width="704" height="317" alt="Image" src="https://github.com/user-attachments/assets/b5d1629b-2ee6-4d02-8c88-029b44102a4e" />
Exactly the same issue. Despite multiple reboots and restarts. It will work slowly but does complete for about 20 minutes and then "Request timed out. Check your internet connection and proxy settings " , after which it will no longer work until restart.
Same problem here. It used to work fine 2 days ago.
same here
Same here
Same here. Been happening for hours ever since about 9 hours ago.
Connection and internet speed is 100% perfectly fine yet the chat just going into "Request timed out. Check your internet connection and proxy settings" and there's no getting out of it other than starting a new chat until that one ends in the same loop.
So far 10 out of 10 chats have ended this way since it started happening 9 hours ago on my end
Actually yea exact same issue with the usage not loading. Likely connected since the chats corrupt and go into "retrying..." after a few messages.
Max $200 plan btw. Usage is 100% available.
<img width="614" height="303" alt="Image" src="https://github.com/user-attachments/assets/6bbbcb80-4052-479b-963b-34b607658ab4" />
it's currently happening regardless of the contex window % left. I can start a fresh session and it just bugs out right away.
the same for me, 8h lost
https://github.com/anthropics/claude-code/issues/14476
Until this issue is resolved, I will continue using
v2.0.70with the following setup.$HOME/.config/claude/settings.jsonI'm also encountering the same issue which started in the last 16 hours. It has occurred after starting a fresh session when the context got to about 10%
I too am experiencing this issue across Multiple Chats.
Happening to me too. First symptom is keystrokes become very laggy; just pressing a single key (not submitting a query) causes the Claude process CPU usage to jump right up. Then the same network retry / API error as described above.
Yea guys just downgraded to 2.0.70 and having all the same symptoms everyone is mentioning above they are completely gone now.
Downgrade and (depending on your system, I'm on WSL2 in windows) use
echo 'export DISABLE_AUTOUPDATER=1' >> ~/.bashrcto make sure it doesn't auto updateI have now Claude Code v2.0.73 and I currently don't have the issue anymore (yesterday I had it really often).
I'm having it with Claude Code v2.0.73 at the moment, yesterday as well, i'm trying to downgrade to 2.0.70
In addition it's sometimes wait till 5 min before using the first token they are having problems
After the latest update to 2.0.73, this issue hasn't resurfaced for me yet. I'll continue to monitor.
Also for the session that was corrupted when I was on 2.0.72, I managed to compact it and salvage what was done into a session handoff doc for continuity.
I just updated from 2.0.76 to 2.1.3 and am having the exact problem described here regardless of token usage. The first indicator of a problem is extreme latency when typing, followed by persistent
API Error: Connection errorand timeouts blaming my Internet connection (which is gigabit fiber, well monitored, and perfectly healthy). Also noted are a number of seemingly unusual messages in the debug log, such as repeated versions of the following:2026-01-11T11:28:36.873Z [ERROR] Error: Error: {"stack":"Error: Failed to export 146 events\n at wn1.doExport (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:262:1297)","message":"Failed to export 146 events","name":"Error"}2026-01-11T11:29:12.752Z [DEBUG] UserCommandMessage rendering: "exit" (args: "none", isSkillFormat: false)spammed over and over, even though I haven't issued an exit command in this session2026-01-11T11:31:23.862Z [ERROR] Error in non-streaming fallback: Connection error.2026-01-11T11:31:23.862Z [ERROR] Connection error details: code=ETIMEDOUT, message=2026-01-11T11:31:23.862Z [ERROR] Error: Error: Connection error.The problem is fixed by downgrading to 2.0.76.
<details>
<summary>Full debug log</summary>
</details>
Issue appears to happen not only in VS Code on Windows but also in terminal on Linux.
Same issue here. Using WSL and I'll have 15-30 minutes of pain-free usage and even get 1-2 compacts in but then random API timeout errors. I also start to experience increased typing latency, missed keystrokes, "Enter" commands interpreted as newlines and all sorts of other bugginess. Using both sonnet and opus models in v2.1.7
/usage
⎿ You've used 96,649 tokens out of 200,000 (48.3% remaining).
Max plan, no where near usage limits. Happens regardless of token usage %
Same issue, I am using CLI version on Ubuntu, and resolved after I restart a whole new session on same working directory.
Does this have to do in any way with rendering on the client?
<img width="1090" height="798" alt="Image" src="https://github.com/user-attachments/assets/63fd60cf-6319-488f-903c-a18445063080" />
I see a lot of CPU usage while processing. I nerfed the CPU frequency, so CPU fan wouldn't be so loud. Then saw CPU activity, made 100% of it available, and voila!
Please LMK if I should open a new issue, or if this is to be reported on another.
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
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.