VSCode Extension webview input field missing when using Remote SSH (requires clean reinstall to fix)
Root Cause
Shell environment resolution timeout. VS Code's Remote SSH extension host has a ~10s timeout to resolve the user's shell environment. A large/slow .bashrc or /etc/profile.d/ script caused this timeout, which prevented the Claude Code extension from completing its init sequence — resulting in a blank/empty webview panel.
Symptoms
- Claude Code tab opens but panel is completely blank (no input field, no UI)
- Extension activates successfully (logs show "Claude code extension is now active")
- Webview sends
initmessage but never receives a response - Tab cannot be reopened without full VS Code reload
- VS Code remote agent log shows:
Unable to resolve your shell environment in a reasonable time
Environment
- VSCode: 1.113.0
- Claude Code Extension: 2.1.78 through 2.1.90 (all affected)
- Local machine: Ubuntu 24.04 (native)
- Remote machine: Ubuntu 24.04 (via Remote SSH)
Actual Fix
Add an early return in .bashrc / shell profile when VS Code is resolving the environment:
# Skip heavy init when VS Code is resolving shell environment
if [[ "$VSCODE_RESOLVING_ENVIRONMENT" == "1" ]] || [[ "$ELECTRON_RUN_AS_NODE" == "1" ]]; then
return 0
fi
What Did NOT Fix It
- Removing npm global install of claude-code
- Reinstalling claude CLI via official installer
- Upgrading Node.js from 18 to 20
- Clearing
~/.claude/ide/*.lockfiles - Resetting
~/.claude/settings.jsonto{} - Reinstalling the VS Code extension
- Wiping
~/.vscode-server(appeared to work temporarily but was coincidental)
Note
The original report incorrectly identified the fix as "complete wipe of ~/.vscode-server". The actual root cause was a slow shell environment that exceeded VS Code's resolution timeout. This is not a bug in Claude Code — it affects any extension that spawns processes requiring the full user environment via Remote SSH.
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗