[BUG] Socket/connection leak in Windows desktop app — established TCP connections to API grow unbounded over a session

Open 💬 0 comments Opened Jun 23, 2026 by winchxyz

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?

Environment: Windows 11, Claude desktop app 1.14271 (Microsoft Store), Claude Code 2.1.181
Description: Established TCP connections to the API (160.79.104.10:443) leak during a session. Fresh start ~20 connections; after ~10–15 min of work they climb to 70, then 130+, and are never released. Causes progressive slowdown — long time-to-first-token and sluggish output. Full app restart drops back to ~20, then climbs again. Reproduces every session regardless of project.
Network is clean: 10ms ping to API, 0% packet loss, clean 9-hop traceroute — not a routing issue.
Also seeing: /bug in-app returns 401, so filing here instead.
Repro: open app → run any Claude Code session → monitor Get-NetTCPConnection filtered by ClaudeProcess → count grows steadily and never drops without restart.

What Should Happen?

Established TCP connections to the API should be pooled and reused (keep-alive), staying in a small stable range (~10–20) throughout a session. Idle or completed connections should be closed and released. The count should not grow unbounded with activity, and a fresh /login should not leave 130+ open sockets.

Error Messages/Logs

Steps to Reproduce

  1. Open the Claude desktop app on Windows (Microsoft Store build) and start any Claude Code session.
  2. Use the session normally — send a few prompts.
  3. In PowerShell, monitor established TCP connections owned by Claude:

Get-NetTCPConnection -State Established |
Where-Object { (Get-Process -Id $_.OwningProcess -EA SilentlyContinue).ProcessName -like 'Claude*' } |
Measure-Object | Select-Object Count

  1. Observe the count: ~20 at a fresh start, climbing to 70–130+ during the session. It jumps to 139 immediately after running /login, not gradually.
  2. Connections to the API (160.79.104.10:443) are never released — the count only drops after a full app restart ("Quit", not closing to tray), then climbs again.
  3. As the count grows, responses slow down (long time-to-first-token and sluggish streaming) across all sessions, regardless of project.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.181

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗