Claude Code suddenly decided to create issue in claude code repo
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:
- Server's 5-minute shutdown timer continues running
- Timer fires → no ExtHost child process exists →
process.exit(0) - 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
- Connect with
ConnectionType.ExtensionHost(value 2) and{ language: "en" } - Wait for
MessageType.Ready(byte0x02) - Send minimal
IExtensionHostInitDataas JSON with:
autoStart: false(don't activate extensions)- Empty
extensionsarray parentPid: 0(disable watchdog)
- Wait for
MessageType.Initialized(byte0x01) - Handle incoming RPC requests with empty/stub responses
- Keep socket open - PersistentProtocol handles keepalives
Key Files
EVIDENCE.md- Full investigation documentationEXTENSION_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.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗