Troubleshooting Guide¶
This guide covers common issues and solutions for AI Code UI.
Quick Diagnostics¶
Check System Status¶
This displays: - Current version - Database location and status - Configuration values - Claude projects folder status
Check Server Logs¶
Backend logs appear in the terminal running npm run dev or npm run server.
Check Browser Console¶
Open browser DevTools (F12) → Console tab for frontend errors.
Check WebSocket Traffic¶
Browser DevTools → Network tab → WS filter
Connection Issues¶
Server Won't Start¶
Symptom: Server fails to start or immediately exits.
Solutions:
-
Check port availability:
-
Check Node.js version:
-
Reinstall dependencies:
-
Check for syntax errors:
WebSocket Connection Failed¶
Symptom: Chat doesn't work, "Connecting..." status persists.
Solutions:
-
Verify server is running:
-
Check WebSocket endpoint:
- Development:
ws://localhost:3001/ws -
Behind proxy: Ensure WebSocket upgrade is configured
-
Check browser extensions:
- Disable ad blockers temporarily
-
VPN/proxy extensions may block WebSocket
-
Check CORS settings:
- Server allows all origins by default
- Custom deployments may need CORS configuration
Cannot Connect to AI Provider¶
Symptom: Messages send but no response from AI.
Solutions:
- Check API credentials:
- Claude: Verify AWS Bedrock credentials or API key
- Cursor: Ensure Cursor CLI is authenticated
-
Codex: Check OpenAI API key configuration
-
Check environment variables:
-
Test Claude CLI directly:
Authentication Issues¶
Login Fails¶
Symptom: Cannot log in with correct credentials.
Solutions:
-
Check database exists:
-
Reset password (if needed):
Then re-register through the UI. -
Check for platform mode:
- If
VITE_IS_PLATFORM=true, authentication is bypassed - First user in database is used automatically
JWT Token Expired¶
Symptom: Logged in but API calls fail with 401.
Solutions:
-
Clear localStorage:
-
Log out and log in again
-
Note: Current implementation has no token expiration. This issue typically indicates token corruption.
Session Not Persisting¶
Symptom: Must log in again after page refresh.
Solutions:
- Check localStorage is enabled:
- Private/incognito mode may block localStorage
-
Some browsers block third-party storage
-
Check for browser storage quota:
Project Discovery Issues¶
Projects Not Appearing¶
Symptom: Sidebar shows no projects or missing projects.
Solutions:
-
Check Claude projects folder:
-
Verify JSONL files exist:
-
Check file permissions:
-
Manually add project:
- Click "+" in sidebar
- Enter project path
- Project is added to
~/.claude/projects/project-config.json
Cursor Projects Missing¶
Symptom: Only Claude projects appear, not Cursor.
Explanation: Cursor uses MD5 hashes of project paths for storage. Discovery requires knowing the path first (cannot reverse-lookup).
Solutions:
- Manually add the project path
- Open project in Cursor first, then it may be discovered
Sessions Not Loading¶
Symptom: Project shows but no chat history.
Solutions:
-
Check session files:
-
Verify file is valid JSONL:
-
Check for file corruption:
- Large files may have truncation issues
- Invalid JSON lines cause parsing failures
Chat Issues¶
Messages Not Sending¶
Symptom: Send button doesn't work or message disappears.
Solutions:
- Check WebSocket status: Look for green connection indicator
- Check browser console for errors
- Verify provider is selected in settings
Tool Approval Stuck¶
Symptom: Tool approval dialog appears but doesn't respond.
Solutions:
- Check for timeout:
- Approvals timeout after 55 seconds
-
SDK cancellation clears pending approvals
-
Refresh the page:
- Pending approvals are cleared on reconnect
-
May need to resend the message
-
Check server logs for approval flow errors
Responses Cut Off¶
Symptom: AI response stops mid-sentence.
Solutions:
- Check context window:
- Default: 160,000 tokens
-
Set
CONTEXT_WINDOWin.envif needed -
Check for abort signals:
- User may have accidentally aborted
-
Network interruption causes abort
-
Check token limits in response
File Browser Issues¶
Files Not Loading¶
Symptom: File tree empty or files won't open.
Solutions:
-
Check project path exists:
-
Check file permissions:
- Server runs as current user
-
Files must be readable
-
Check for symlinks:
- Symlinks outside project root are blocked
- Security measure prevents path traversal
Editor Won't Save¶
Symptom: Save button fails or content lost.
Solutions:
-
Check write permissions:
-
Check for file locks:
- Other editors may have file open
-
Git operations may lock files
-
Check disk space
Terminal Issues¶
Terminal Not Connecting¶
Symptom: Shell shows "Connecting..." or blank.
Solutions:
- Check PTY support:
node-ptyrequires native compilation-
May need to rebuild:
npm rebuild -
Check shell availability:
-
Check WebSocket endpoint
/shell
Terminal Output Garbled¶
Symptom: Colors or formatting broken.
Solutions:
- Check terminal type:
- xterm.js expects xterm-256color
-
Some shells need TERM configured
-
Resize terminal:
- Drag terminal divider
- Triggers resize event
Git Panel Issues¶
Git Operations Failing¶
Symptom: Stage, commit, or other git commands fail.
Solutions:
-
Check git is initialized:
-
Check git configuration:
-
Configure in Settings:
- Go to Settings → Git
- Set name and email
Branch Operations Fail¶
Symptom: Cannot switch branches or create new ones.
Solutions:
- Check for uncommitted changes
- Check for merge conflicts
- Verify branch name is valid
Database Issues¶
Database Locked¶
Symptom: "Database is locked" errors.
Solutions:
-
Stop other processes:
-
Check for zombie processes:
-
Delete lock file if exists:
Database Corruption¶
Symptom: Queries fail or return unexpected results.
Solutions:
-
Check database integrity:
-
Export and reimport:
-
Start fresh:
Performance Issues¶
Slow Page Load¶
Solutions:
-
Check build is production:
-
Check for large session files
- Clear browser cache
High Memory Usage¶
Solutions:
- Check for memory leaks in DevTools
- Limit chat history display
- Close unused terminal sessions
Slow File Tree¶
Solutions:
- Large directories take time to load
- Add paths to
.gitignorestyle exclusions - Check for node_modules in project
Getting Help¶
If issues persist:
- Check server logs for detailed error messages
- Check browser console for frontend errors
- Report issues at GitHub Issues
Include: - Node.js version - Operating system - Error messages - Steps to reproduce
See Also¶
- Getting Started - Initial setup
- Configuration - Environment variables
- CLI Reference - Command-line options