Troubleshooting
pgvector Extension Requires Superuser
Section titled “pgvector Extension Requires Superuser”Problem: CREATE EXTENSION vector fails with “permission denied to create extension”.
Cause: The assistant database user is not a superuser. PostgreSQL extensions must be created by a superuser.
Solution: Install the extension using the database superuser:
# Find your superuser name (check POSTGRES_USER in docker-services/.env)docker exec <db-container> psql -U <superuser> -d assistant \ -c "CREATE EXTENSION IF NOT EXISTS vector;"After that, the non-superuser assistant role can use the extension normally. The migration code handles this gracefully — if the extension cannot be created, it logs a warning and continues without vector search.
Migration Error: “Can’t find meta/_journal.json”
Section titled “Migration Error: “Can’t find meta/_journal.json””Problem: Drizzle ORM migrations fail because the metadata journal file is missing.
Cause: The migration SQL file exists but the Drizzle metadata directory (src/db/migrations/meta/) was not created.
Solution: Ensure the meta directory and journal exist:
mkdir -p src/db/migrations/metaCreate src/db/migrations/meta/_journal.json:
{ "version": "7", "dialect": "postgresql", "entries": [ { "idx": 0, "version": "7", "when": 1708000000000, "tag": "0000_initial", "breakpoints": true } ]}Collation Version Mismatch Warning
Section titled “Collation Version Mismatch Warning”Problem: PostgreSQL warns about collation version mismatch on every query.
Cause: The database was created with a different OS/glibc version than the current container. This is harmless.
Solution (optional): Run inside the database container:
ALTER DATABASE assistant REFRESH COLLATION VERSION;Model Registry Duplicate Key on Restart
Section titled “Model Registry Duplicate Key on Restart”Problem: Server crashes with Key (name)=(cli/codex-cli) already exists on restart.
Cause: This was a bug where disabled models were not found during the existence check, causing duplicate INSERT attempts.
Status: Fixed. The model registry now checks existence regardless of isEnabled status.
Database Connection Failed
Section titled “Database Connection Failed”Problem: Server fails to start with PostgreSQL connection error.
Solution:
# Check PostgreSQL is runningcd ~/docker-services && docker compose ps db
# Start it if stoppeddocker compose up -d db
# Verify connectiondocker exec <db-container> psql -U <user> -d assistant -c "SELECT 1;"
# Check DATABASE_URL in .env matches your docker-services credentialsRedis Connection Failed
Section titled “Redis Connection Failed”Problem: Server fails to start with Redis connection error.
Solution:
# Check Redis is runningcd ~/docker-services && docker compose ps redis
# Start it if stoppeddocker compose up -d redis
# Test connectiondocker exec <redis-container> redis-cli pingLiteLLM Not Running
Section titled “LiteLLM Not Running”Problem: Model health checks fail, no LLM responses.
Solution:
cd ~/docker-servicesdocker compose up -d litellm
# Check logsdocker compose logs litellm
# Verify it's reachablecurl http://localhost:4000/healthPort Conflicts
Section titled “Port Conflicts”Problem: “Address already in use” on startup.
Solution: Check what is using the port and either stop it or change the port in .env:
# Check what's using a portlsof -i :3005 # Backendlsof -i :3007 # Web UI
# Or change ports in .envAPI_PORT=3008WEB_PORT=3009Browser Skill: Playwright Not Installed
Section titled “Browser Skill: Playwright Not Installed”Problem: Browser skill fails with “Executable doesn’t exist”.
Solution:
bunx playwright install chromiumThis downloads the Chromium browser binary that Playwright uses for browser automation and web scraping.