[BUG] `codex_sandbox` firewall rules cause intermittent ECONNRESET in VS Code extension (Windows)

Resolved 💬 2 comments Opened Jun 7, 2026 by wilves Closed Jul 14, 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?

Environment:

  • OS: Windows 11 (10.0.26200)
  • VS Code: 1.123.0
  • Claude Code extension: 2.1.168
  • CLI: working normally

Symptom:
The VS Code extension sidebar intermittently fails to connect to claude.ai with ECONNRESET. The error appears in the Claude Code Output panel:

1P event logging: 1 events failed to export (code=ECONNRESET, The socket connection was closed unexpectedly.)

The failure is random — the CLI works fine throughout.

Root cause (likely):
Three Windows Firewall rules created by Claude Code's sandbox are active system-wide:

codex_sandbox_offline_block_outbound — blocks all outbound to all IPs, any program
codex_sandbox_offline_block_loopback_tcp — blocks loopback TCP
codex_sandbox_offline_block_loopback_udp — blocks loopback UDP

On Windows there is no process-level network isolation, so these rules apply to all processes including VS Code's Electron/Node backend. When the extension attempts to connect to claude.ai while these rules are active, the connection is reset.

What Should Happen?

Expected behavior:
Sandbox firewall rules should be scoped to the sandboxed process only, or cleaned up reliably when the sandbox exits.

Error Messages/Logs

API Error: Unable to connect to API (ECONNRESET)

Steps to Reproduce

Symptom:
The VS Code extension sidebar intermittently fails to connect to claude.ai with ECONNRESET. The error appears in the Claude Code Output panel:

1P event logging: 1 events failed to export (code=ECONNRESET, The socket connection was closed unexpectedly.)

The failure is random — the CLI works fine throughout.

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

same version. The issue shows up randomically

Claude Code Version

2.1.168

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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