Skip to content
Code Insights
Documentation

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/

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.db

Migration error on startup

If the CLI says "migration failed", try resetting the database:

code-insights reset --confirm
code-insights sync

Dashboard issues

Port already in use

Port 7890 is taken by another process. Find it:

lsof -i :7890

Kill it or wait for it to finish, then retry code-insights dashboard.

Blank page when opening dashboard

  1. Check that the CLI process is still running in your terminal
  2. Try a hard refresh: Cmd+Shift+R (macOS) or Ctrl+Shift+R (Linux)
  3. 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 serve

Hook issues

Auto-sync hook not triggering

Check that the hook is installed:

cat ~/.claude/settings.json | grep code-insights

If 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-hook

Getting 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