Skip to content

[BUG] VSCode Remote SSH: "enabledPlatforms" TypeError causes initialization failure and session issues #21336

Description

@timecarlesk

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Bug Description

Claude Code VSCode extension fails to initialize properly in Remote SSH environment with the following error in VSCode Output logs:

Failed to check enabledPlatforms: TypeError: undefined is not an object (evaluating 'd7.join')

This error causes:

  1. Session history not being saved/loaded
  2. OAuth authentication appearing to succeed but extension not recognizing it
  3. Dragging session to new window causes infinite loading
  4. Multiple zombie Claude processes accumulating

Environment

Property Value
Claude Code Version 2.1.20
VSCode Version 1.107.1
OS RHEL 8.10 (Remote Server)
Kernel 4.18.0-553.85.1.el8_10.x86_64
Connection Method VSCode Remote SSH
Auth Method Claude Pro/Max OAuth

Steps to Reproduce

  1. Connect to remote Linux server via VSCode Remote SSH
  2. Install Claude Code extension (2.1.20)
  3. Run /login - OAuth flow completes in browser
  4. Extension shows loading state, then errors or becomes unresponsive
  5. Check VSCode Output → Claude Code logs → see "enabledPlatforms" error
  6. New sessions don't persist, dragging to new window causes infinite spinner

Observations

  • .credentials.json file IS created with valid tokens
  • Multiple Claude processes spawn but don't terminate when closing tabs (process leak)
  • Running claude directly in SSH terminal works fine
  • The bug appears to be in the extension's platform detection code

Expected Behavior

Extension should gracefully handle undefined enabledPlatforms and complete initialization.

Logs

VSCode Output log shows:
[DEBUG] Failed to check enabledPlatforms: TypeError: undefined is not an object (evaluating 'd7.join')

Debug log shows:
[DEBUG] [Query.streamInput] Has bidirectional needs, waiting for first result
(then hangs indefinitely)

Workaround Attempted

  • Full reinstall of extension: No effect
  • Clearing ~/.claude: No effect
  • Setting NODE_OPTIONS="--dns-result-order=ipv4first": No effect
  • Using CLI directly via SSH terminal: Works
    Labels
    bug
    area:ide
    platform:linux
    area:auth

What Should Happen?

  1. The extension should properly handle cases where enabledPlatforms is undefined by using defensive checks (e.g., enabledPlatforms?.join() or Array.isArray(enabledPlatforms) ? enabledPlatforms.join() : '')

  2. New sessions should initialize successfully and be responsive immediately after creation

  3. Session history should persist and be visible when opening new Claude Code tabs

  4. Dragging a session to a new window should work without infinite loading

  5. Closing a Claude Code tab should properly terminate its associated background process (no zombie processes)

  6. OAuth authentication tokens stored in .credentials.json should be correctly read and used by all new sessions

Error Messages/Logs

Steps to Reproduce

  1. Environment Setup:

    • Local machine: macOS/Windows with VSCode installed
    • Remote server: RHEL 8.10 (or similar Linux)
    • Claude Code extension version: 2.1.20
    • VSCode version: 1.107.1
  2. Connect to remote Linux server via VSCode Remote SSH extension

  3. Install Claude Code extension (it will install on the remote server)

  4. Open Claude Code panel and run /login

    • Browser opens OAuth authorization page
    • Click "Authorize"
    • Browser shows success page
  5. Return to VSCode - observe the following symptoms:

    • Claude Code panel shows loading spinner indefinitely
    • OR panel appears but is unresponsive
  6. Check VSCode Output panel (View → Output → select "Claude Code"):

    • You will see: Failed to check enabledPlatforms: TypeError: undefined is not an object (evaluating 'd7.join')
  7. Try opening a new Claude Code session (+ button or Cmd/Ctrl+Shift+P → "Claude Code: New Session"):

    • New session also hangs with loading spinner
  8. Try dragging the Claude Code tab to create a new window:

    • New window shows infinite loading spinner
  9. Close Claude Code tabs and check terminal:

    ps aux | grep claude | grep -v grep
    
    

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.20

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions