Diagnostic Steps
Before diving into specific issues, gather diagnostic information:Common Issues
OpenCode Won’t Start
Symptom: Command not found
Symptom: Command not found
Symptom: Crashes immediately
Symptom: Crashes immediately
Error: OpenCode starts then exits within seconds.Debugging:Common causes:
Port conflict
Port conflict
Corrupted config
Corrupted config
Permission errors
Permission errors
Symptom: Blank screen or frozen UI
Symptom: Blank screen or frozen UI
Symptoms: TUI starts but shows nothing or freezes.Quick fixes:
-
Force redraw:
- Press
Ctrl+Lto redraw screen
- Press
-
Check terminal compatibility:
If not, set it:
-
Try different terminal:
- macOS: iTerm2, Alacritty, or native Terminal.app
- Linux: gnome-terminal, konsole, alacritty
- Windows: Windows Terminal, not Command Prompt
Authentication Issues
Cannot connect to provider
Cannot connect to provider
Error:Solutions:If these fail, check proxy settings (see Network Configuration).
Check network connectivity
API key works elsewhere but not in OpenCode
API key works elsewhere but not in OpenCode
Cause: Key format issue or whitespace.Fix:Ensure no leading/trailing whitespace:
Model Errors
ProviderModelNotFoundError
ProviderModelNotFoundError
Error:Cause: Incorrect model reference format.Solution:Models must be referenced as List available models:Common model IDs:
<providerID>/<modelID>:openai/gpt-4.1openai/gpt-4.1-minianthropic/claude-4.5-sonnetopenrouter/google/gemini-2.5-flash
Model not available
Model not available
Error:Causes:Fallback to available model:
- Model requires paid subscription
- Account doesn’t have access
- Model deprecated/renamed
opencode.json
Provider Package Issues
AI_APICallError: Outdated provider packages
AI_APICallError: Outdated provider packages
Symptoms:
- API errors mentioning unknown parameters
- “Unexpected field” errors
- Sudden failures after provider API updates
Provider packages are cached in
~/.cache/opencode to speed up startup. Clear this if you encounter API compatibility issues.Configuration Issues
ProviderInitError
ProviderInitError
Config changes not taking effect
Config changes not taking effect
Cause: Config cached or syntax error preventing reload.Solutions:
-
Restart OpenCode:
-
Verify config location:
Config priority:
.opencode/opencode.json(project-specific)~/.config/opencode/opencode.json(user-specific)
-
Validate syntax:
Desktop App Issues
App won't launch
App won't launch
Quick checks:
- Fully quit and relaunch:
- macOS: Cmd+Q, then reopen
- Windows: Right-click tray icon → Exit, then reopen
- Check for error dialog:
- Click “Restart” button if shown
- Copy error details for debugging
- macOS only - Reload webview:
- Menu: OpenCode → Reload Webview
- Helps if UI is blank/frozen
Connection failed
Connection failed
Symptoms: “Connection Failed” dialog on launch.Causes:
- Custom server URL is unreachable
- Port conflict preventing local server start
- Firewall blocking connection
Plugin causing crashes
Plugin causing crashes
Symptoms: App crashes on launch after installing plugin.Fix: Disable plugins
Clear app cache
Clear app cache
When: App behaves strangely, plugin install stuck.
- macOS
- Linux
- Windows
Notifications not showing
Notifications not showing
Requirements:
- Notifications enabled in OS settings for OpenCode
- App window not focused (notifications only show when backgrounded)
- macOS
- Windows
- Linux
System Settings → Notifications → OpenCode → Allow Notifications ✓
Linux-Specific Issues
Copy/paste not working
Copy/paste not working
Cause: Missing clipboard utilities.Solution: Install clipboard toolsVerify fix:
- X11 (most common)
- Wayland
- Headless (SSH/Docker)
Wayland compositor issues
Wayland compositor issues
Symptoms: Blank window, crashes on Linux with Wayland.Try Wayland flag:If worse, use X11 session:
- Log out
- At login screen, select “Ubuntu on Xorg” or “GNOME on Xorg”
- Log in and launch OpenCode
Windows-Specific Issues
WebView2 missing
WebView2 missing
Error: App opens to blank window (Windows only).Cause: Microsoft Edge WebView2 Runtime not installed.Solution:
Download WebView2 Runtime
Performance issues
Performance issues
Symptoms: Slow file operations, laggy terminal, high CPU.Recommended: Use WSLSee Windows WSL Guide for optimal Windows setup.WSL provides:
- 10-20x faster file I/O
- Better terminal support
- Native Linux tool compatibility
Advanced Debugging
Enable Debug Logging
Inspect Database
OpenCode uses SQLite for storage:Network Debugging
Profile Performance
Reset Everything (Last Resort)
- macOS/Linux
- Windows
Getting Help
GitHub Issues
Report bugs and request features. Search existing issues first.
Discord Community
Real-time help from the community and maintainers.
Documentation
Comprehensive guides and API references.
Enterprise Support
Priority support for enterprise customers.
When Reporting Issues
Include this information:System Information
System Information
Error Logs
Error Logs
Configuration
Configuration
Reproduction Steps
Reproduction Steps
- Step-by-step instructions to reproduce
- Expected behavior
- Actual behavior
- Screenshots/screencasts if applicable
Preventive Measures
Keep Updated
Backup Sessions
Monitor Logs
Check logs after updates:
Test Config Changes
Test config in isolated session:
Next Steps
Server Configuration
Advanced server setup and debugging.
Network Setup
Resolve proxy and certificate issues.
Windows WSL
Fix Windows-specific performance issues.