Claude Code suddenly decided to create issue in claude code repo

Resolved 💬 4 comments Opened Jan 13, 2026 by nakedible Closed Mar 14, 2026

Below is an issue that was supposed to be created in current github repository via gh command line tool.

However, claude code explicitly gave gh command line the argument anthropics/claude-code, even though absolutely nothing in any conversation even referred to claude code specifically.

So consider this a bug report that claude code may randomly file a bug into claude code repo, instead of whatever the user was working on ;-)

❯ Add a github issue explaining the minimal things for vsterm to do

● Bash(gh issue create --repo anthropics/claude-code --title "vsterm: Implement ExtensionHost connection to prevent
      5-minute server shutdown" --body "## Problem…)
  ⎿  https://github.com/anthropics/claude-code/issues/17899

● I created the issue but in the wrong repo. Let me check where vsterm issues should go:

----

Problem

vsterm connections to VS Code server are terminated after exactly 5 minutes, even when the connection is active.

Root Cause

The VS Code server has an auto-shutdown mechanism (--enable-remote-auto-shutdown) that kills the entire server process after 5 minutes if no ExtensionHost connection exists.

  • Browser establishes two connections: Management + ExtensionHost
  • vsterm only establishes a Management connection

When vsterm connects without an ExtensionHost connection:

  1. Server's 5-minute shutdown timer continues running
  2. Timer fires → no ExtHost child process exists → process.exit(0)
  3. Server dies, killing all connections and terminals

Evidence

| Test | Result |
|------|--------|
| vsterm-only connection | Dies at exactly 5 minutes |
| Browser connects first, then vsterm | Survives 11+ minutes |
| New terminal created by vsterm in browser session | Survives 6+ minutes |

The browser's ExtensionHost connection spawns a child process that persists even after browser disconnects (3-hour grace period), keeping the server alive.

Solution

vsterm needs to establish an ExtensionHost connection in addition to the Management connection.

Minimal Implementation

  1. Connect with ConnectionType.ExtensionHost (value 2) and { language: "en" }
  2. Wait for MessageType.Ready (byte 0x02)
  3. Send minimal IExtensionHostInitData as JSON with:
  • autoStart: false (don't activate extensions)
  • Empty extensions array
  • parentPid: 0 (disable watchdog)
  1. Wait for MessageType.Initialized (byte 0x01)
  2. Handle incoming RPC requests with empty/stub responses
  3. Keep socket open - PersistentProtocol handles keepalives

Key Files

  • EVIDENCE.md - Full investigation documentation
  • EXTENSION_HOST.md - Detailed protocol documentation

Complexity

Medium - requires implementing:

  • Second WebSocket connection with ExtensionHost handshake
  • Binary RPC protocol (at least for receiving and stub-responding)
  • IExtensionHostInitData JSON structure

The ExtensionHost child process will run but won't load any extensions. It just needs to exist to prevent server shutdown.

View original on GitHub ↗

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