Troubleshooting
OpenCode stores diagnostic information in logs and local storage.
Logs
Log files are saved to:
- macOS/Linux:
~/.local/share/opencode/log/ - Windows:
%USERPROFILE%\.local\share\opencode\log\
Log files are named with timestamps (e.g., 2025-01-09T123456.log). The most recent 10 files are kept.
Increase verbosity:
opencode --log-level DEBUGStorage
Application data location:
- macOS/Linux:
~/.local/share/opencode/ - Windows:
%USERPROFILE%\.local\share\opencode
Getting Help
- GitHub Issues: github.com/anomalyco/opencode/issues
- Discord Community: opencode.ai/discord
Common Issues
OpenCode Won't Start
- Review error messages in log files
- Run with
--print-logsflag - Update to latest:
opencode upgrade
Authentication Problems
- Use
/connectto re-authenticate - Verify API key validity
- Confirm network access
Model Not Available
- Confirm provider authentication
- Check format:
<providerId>/<modelId> - Run
opencode modelsto list models
ProviderInitError
- Review providers documentation
- Clear configuration:
rm -rf ~/.local/share/opencode - Re-authenticate via
/connect
Provider Package Issues
Clear the cache:
rm -rf ~/.cache/opencodeCopy/Paste Not Working (Linux)
Install clipboard utilities:
# X11
apt install -y xclip
# Wayland
apt install -y wl-clipboard