claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Claude Code Agent Going Offline During Active Development

Open pm0code opened this issue 1 year ago • 39 comments

Environment:

  • Claude Code Version: Latest (as of 2025-01-09)
  • Model: Opus 4
  • OS: Windows 11 via WSL2

Description: The Claude Code agent appears to "go offline" or become unresponsive during active development work. The agent is actively working and producing output, but from the user's perspective, it seems to disconnect or pause unexpectedly.

Steps to Reproduce:

  1. Start a complex development task (e.g., implementing canonical framework)
  2. Agent begins research and implementation
  3. Agent creates multiple files and documentation
  4. User perceives agent as "going offline" despite active work continuing

Expected Behavior:

  • Continuous, visible progress updates
  • Clear status indicators when processing
  • No perception of disconnection during active work

Actual Behavior:

  • Agent appears to disconnect or pause
  • User has to prompt "why do you go offline?"
  • Work is actually continuing but not visibly apparent to user

Impact:

  • Disrupts development flow
  • Creates uncertainty about agent status
  • Requires manual intervention to confirm agent is working

Possible Causes:

  1. Long-running file operations without status updates
  2. Complex research/thinking processes without visible output
  3. UI not updating during intensive operations
  4. Missing progress indicators during multi-step tasks

Suggested Fix:

  • Add periodic status updates during long operations
  • Implement progress indicators for multi-step tasks
  • Provide heartbeat/alive indicators during processing
  • Better communicate when agent is thinking vs. offline

Reproducibility: Consistent during complex, multi-file operations

Severity: High - Impacts developer productivity and confidence

Additional Context: This issue occurred multiple times during canonical framework implementation, causing the user to interrupt work and question agent availability.

pm0code avatar Jul 09 '25 00:07 pm0code

Image

pm0code avatar Jul 09 '25 00:07 pm0code

Image

pm0code avatar Jul 09 '25 00:07 pm0code

The 529 error is unrelated (Opus is down 😦 ). Let's focus on the false "offline" display for this issue?

dicksontsai avatar Jul 09 '25 01:07 dicksontsai

I can confirm, i am facing the same issue and causing some MCP disruptions due to this.

Claude Code Plan: MAX (Opus 4) Machine: M3 Max (Apple Silicon) OS: Sequoia (WARP Terminal)

Hopefully we can fix this issue in a reasonable timeline 🤞

halandi avatar Jul 11 '25 10:07 halandi

I'm having exactly the same issue with it hanging in 'offline'.

Environment

  • Claude Code: v1.0.45
  • Plan: Max
  • Chip: Apple M1 Pro
  • Memory: 32 GB
  • OS: Sonoma

TheRealJimShady avatar Jul 11 '25 14:07 TheRealJimShady

@halandi I double-checked our client code and I see that the "offline" label only provides visual UI feedback. It does not impact any functionality at all. If you see "disruption", you most likely have network issues on your end.

The main issue we're investigating here is when the "offline" label incorrectly triggers when the user is actually online, causing the user to be confused.

dicksontsai avatar Jul 11 '25 16:07 dicksontsai

Same issue. No other networking issues other than claude:

Image

pcj avatar Jul 11 '25 19:07 pcj

Same issue, no networking issues and the terminal becomes stuck (no ability to type, ctrl+c, nothing) for about 5 minutes then comes back and all keystrokes get put in all at once... very weird

theobong avatar Jul 11 '25 22:07 theobong

Same issue here. it was intermittent issue, if you wait for some minutes, sometimes it works again. but when generating toker somehow feels not right because there is a pause in generating compared my previous experience using it.

Image

hamhanry avatar Jul 12 '25 00:07 hamhanry

Exactly the same issue. Offline keeps coming on, unresponsive terminal, and limited Opus 4 usage on a Max plan.. (small sessions, 30 miniatures before sonnet tier downgrade)

searchingtofind avatar Jul 12 '25 09:07 searchingtofind

Telling claude to break down the work into smaller tasks so that it doesn't hang seems to help.

TheRealJimShady avatar Jul 12 '25 10:07 TheRealJimShady

Same issue here, Claude Code says it is offline, and the terminal freezes, you cannot "esc" to stop an operation, or enter text in the terminal. It is just frozen. You just have to wait. And this is killing a lot of time. Claude Code is really quite amazing, but this is a showstopper. I'm actually trying out other options, simply out of frustration.

I also see the terminal just freeze up, without the offline message. You cannot "esc" to pause an operation that is running, you just have to wait for it to complete.

I would say the not being able to "esc" from an in-progress task and the appearance of the offline message, are happening around 80-90% of the time at the moment. This wastes a large number of tokens on tasks that would have been terminated, and significantly slows down coding sessions. This is an amazing product, but it is quickly becoming unusable, as it is slowing me down, rather than speeding up what I do.

I am also seeing more of the API timeout errors, where Claude Code, just seems to be waiting for a long time, and then it shows 1/10 timeout errors, and continues 2/10 etc... for a very long time, but with these I can at least exit Claude Code, by typing in the terminal, and restart with claude --continue. Still not great, and you do not know what is going on until the first API timeout error is displayed, which can be a minute or more.

Image

It says 71s, but it was more like 3 minutes, by the time it completed, it just stopped updating the time. This is typical of my experience at the moment.

Astrotope avatar Jul 13 '25 08:07 Astrotope

Similar. I'm on Linux Mint, terminal with claude code just hung for minutes stating offline, then came back. Curiously, it happened right after I saw Claude Opus 4 limit reached, now using Sonnet 4. I'm on the Max plan.

matthewadams avatar Jul 13 '25 11:07 matthewadams

I'm having exactly the same issue and no networking issues with it hanging in 'offline'.

Environment

Claude Code: v1.0.45 Plan: Max Chip: Apple M4 Pro Memory: 64 GB OS: 15.5 (24F74)

necipsunmaz avatar Jul 13 '25 12:07 necipsunmaz

Same here, using pro, max, sonnet, or opus.

charlesvestal avatar Jul 13 '25 13:07 charlesvestal

I have exactly the same issue. Also M2 chip, 64 GB ram, max plan. I wonder if Claude can keep up with demand.

davidleitch1 avatar Jul 14 '25 00:07 davidleitch1

Facing this same issue. m1 64 ram

samuelho-dev avatar Jul 14 '25 01:07 samuelho-dev

have the same issue here. bump this up

ahmad-farras avatar Jul 14 '25 08:07 ahmad-farras

Use claude doctor seems to have fixed the issue for me

⎿ API Error (Request timed out.) · Retrying in 1 seconds… (attempt 1/10) ⎿ API Error (Request timed out.) · Retrying in 1 seconds… (attempt 2/10) ⎿ API Error (Request timed out.) · Retrying in 2 seconds… (attempt 3/10) ⎿ API Error (Request timed out.) · Retrying in 4 seconds… (attempt 4/10) ⎿ API Error (Request timed out.) · Retrying in 8 seconds… (attempt 5/10) ⎿ API Error (Request timed out.) · Retrying in 19 seconds… (attempt 6/10) ⎿ API Error (Request timed out.) · Retrying in 35 seconds… (attempt 7/10) ⎿ API Error (Request timed out.) · Retrying in 35 seconds… (attempt 8/10)

try again ⎿ API Error (Request timed out.) · Retrying in 1 seconds… (attempt 1/10) ⎿ API Error (Request timed out.) · Retrying in 1 seconds… (attempt 2/10) ⎿ API Error (Request timed out.) · Retrying in 33 seconds… (attempt 9/10) ⎿ API Error (Request timed out.) · Retrying in 2 seconds… (attempt 3/10) ⎿ API Error (Request timed out.) · Retrying in 4 seconds… (attempt 4/10) ⎿ API Error (Request timed out.) · Retrying in 8 seconds… (attempt 5/10) ⎿ API Error (Request timed out.) · Retrying in 36 seconds… (attempt 10/10) ⎿ API Error (Request timed out.) · Retrying in 19 seconds… (attempt 6/10) ⎿ API Error (Request timed out.) · Retrying in 38 seconds… (attempt 7/10) ⎿  API Error: Request timed out.

claude doctor

Samxx97 avatar Jul 14 '25 10:07 Samxx97

I have been getting the same issues here.

Claude Code: v1.0.51 Plan: Max Chip: Apple intel i9 Memory: 32 GB OS: 15.5

cbaugus avatar Jul 14 '25 17:07 cbaugus