Problem Description
Plugin fails to detect Windsurf credentials because the --csrf_token argument is no longer present in the language server process.
Environment
- Windsurf version: 1.9577.43
- Plugin version: 0.1.0
- Platform: macOS (Apple Silicon)
Steps to Reproduce
- Install opencode-windsurf-auth plugin
- Configure opencode.json with windsurf provider
- Launch Windsurf and login
- Run opencode chat --model=windsurf/claude-4.5-opus-thinking Hello
Expected Behavior
Plugin should detect running Windsurf and authenticate successfully.
Actual Behavior
Error message: Windsurf is not running. Please launch Windsurf first.
Root Cause Analysis
Process arguments for language_server_macos:
--parent_pipe_path /var/folders/... --windsurf_version 1.9577.43 --stdin_initial_metadata
The --csrf_token argument is missing. The authentication mechanism appears to have changed in recent Windsurf versions to use --stdin_initial_metadata instead.
Additional Context
- Windsurf IS running and logged in
- The API key is accessible in ~/.codeium/config.json
- Port 49740 is listening (verified via lsof)
Suggested Fix
Update credential discovery to support the new --stdin_initial_metadata authentication mechanism.
Problem Description
Plugin fails to detect Windsurf credentials because the --csrf_token argument is no longer present in the language server process.
Environment
Steps to Reproduce
Expected Behavior
Plugin should detect running Windsurf and authenticate successfully.
Actual Behavior
Error message: Windsurf is not running. Please launch Windsurf first.
Root Cause Analysis
Process arguments for language_server_macos:
--parent_pipe_path /var/folders/... --windsurf_version 1.9577.43 --stdin_initial_metadata
The --csrf_token argument is missing. The authentication mechanism appears to have changed in recent Windsurf versions to use --stdin_initial_metadata instead.
Additional Context
Suggested Fix
Update credential discovery to support the new --stdin_initial_metadata authentication mechanism.