[BUG] Claude Code stops running when disconnected from code-server/VS Code Remote while process remains running

Resolved 💬 3 comments Opened Oct 1, 2025 by Git-on-my-level Closed Jan 7, 2026

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 stops working when run in interactive mode when the client disconnects from code-server while the Claude Code process continues running on the remote host. The process remains alive upon reconnect and picks up as if nothing happened.

This behavior did not happen for v1 claude-code instances.

I can interact with the TUI upon reconnect (e.g. typing, ctrl+t all work) so it's not the buffer catching up.

What Should Happen?

Claude Code should continue making progress even after I disconnect from my code-server instance since everything continues running in the background. Note that Codex and Cursor Agent CLI do not exhibit this behavior.

Error Messages/Logs

Example of a subagent starting work, then resuming after reconnect (6h 49m 5s)
<img width="656" height="354" alt="Image" src="https://github.com/user-attachments/assets/99faa169-3298-4434-bddd-15dc55923c82" />

Steps to Reproduce

  1. Run claude-code in a terminal on code-server
  2. Disconnect from code-server and wait enough time for the task to have been completed
  3. Reconnect to code-server and see that claude-code has not finished and resumes from about where you left off

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

1.0.120 (I suspect any v1 major version still works)

Claude Code Version

2.0.2 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

Chat with Claude: https://claude.ai/share/34e2d6ef-4818-46c3-aeb0-eb5ece8bcf2b

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗