Cline Root Drive Fixer
This extension patches a known initialization bug in the Cline extension.
The Problem
Cline v4.0.0+ uses a path validator that crashes if a workspace folder is a Windows drive root (e.g., V:\ or R:\). When Node's path.basename('V:\\') returns an empty string, the extension's validation schema (Zod) fails, causing the extension to crash on startup.
The Solution
This extension uses a Node.js runtime patch to intercept path.basename calls. When it detects a root drive path, it provides a valid alias string (V_Drive) to satisfy the validator, allowing Cline to initialize normally.
Features
- Zero-config: Automatically patches drive paths upon activation.
- Non-destructive: Does not modify your file system or move your workspace files.
- Safe: Uses a targeted regex to only patch drive-root paths; all other file paths function normally.
Requirements
- VS Code Insiders or Stable.
- Cline must be installed.
Usage
Simply install this extension alongside Cline. No configuration is required. Once installed, reload your window, and Cline will initialize without Zod validation errors.
Troubleshooting: "Extension Host Unresponsive" or Startup Crashes
If you are seeing a ZodError or Cline crashes immediately on startup, it is because Cline has already cached the invalid drive-root path in its local database.
- Close VS Code completely.
- Navigate to your global storage directory:
- Windows + Insiders:
%APPDATA%\Code - Insiders\User\globalStorage\saoudrizwan.claude-dev
- Windows:
%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev
- macOS/Linux:
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev
- Delete the
saoudrizwan.claude-dev folder.
Note: This will not delete your project files, but it will reset your Cline chat history and extension settings.
- Install this patch.
- Restart VS Code. The patch will now intercept the drive path before Cline can cache the broken version again.
Built as a utility for the Viktor Substrate Nexus.