Troubleshooting
Solutions for common Code Insights issues — sync failures, database errors, dashboard not loading, missing sessions, and provider detection problems.
Sync issues
No sessions found
Run code-insights status to see what the CLI discovered. If the count is 0:
- Verify you have at least one AI coding tool installed and have used it
- Check that the expected session files exist:
- Claude Code:
ls ~/.claude/projects/ - Codex CLI:
ls ~/.codex/sessions/ - Copilot CLI:
ls ~/.copilot/session-state/
- Claude Code:
Slow first sync
The first sync processes your entire history. If you have many sessions, this can take several minutes. Subsequent syncs are incremental.
SQLite locked error
Another process is accessing the database. Wait a moment and retry. If the error persists, check for stuck processes:
lsof ~/.code-insights/data.dbMigration error on startup
If the CLI says "migration failed", try resetting the database:
code-insights reset --confirm
code-insights syncDashboard issues
Port already in use
Port 7890 is taken by another process. Find it:
lsof -i :7890Kill it or wait for it to finish, then retry code-insights dashboard.
Blank page when opening dashboard
- Check that the CLI process is still running in your terminal
- Try a hard refresh: Cmd+Shift+R (macOS) or Ctrl+Shift+R (Linux)
- Check the terminal for error messages
LLM analysis fails
- Verify your API key is correct in Settings
- Check your internet connection (required for OpenAI, Anthropic, Gemini)
- For Ollama: verify the service is running (
ollama serve) and the model is installed
Ollama CORS error
Ollama requires CORS configuration to accept requests from localhost:7890:
OLLAMA_ORIGINS="http://localhost:7890" ollama serveHook issues
Auto-sync hook not triggering
Check that the hook is installed:
cat ~/.claude/settings.json | grep code-insightsIf not present, run code-insights install-hook again.
Wrong path in hook
If you installed Code Insights via npm and the hook uses a different path, reinstall it:
code-insights uninstall-hook
code-insights install-hookGetting help
If you can't resolve an issue, open a GitHub Issue with:
- Your OS and Node.js version
- The full error message
- Output of
code-insights --version