Troubleshooting
Then free the port and stop stragglers, confirm clean, and start one instance:
f62d7985
View source ↗
- Docker build “not enough free space”: Run
docker system prune -ato remove unused images, containers, and build cache. Add--volumesif you also want to reclaim volume space (this deletes data in unnamed volumes). On macOS, Docker Desktop’s disk image can also be resized in Settings → Resources. - 403 from
/transcribe: Ensure the calling number exists inPHONE_TO_NAME_MAP. - ngrok 502 / Twilio timeout: Confirm the Flask process is running and ngrok points to the correct port (5001 for Twilio webhooks).
- Prax won’t start / “Address already in use” on :5001 (local run): a previous instance is still bound to the port — common when the pidfile-based
make restart-praxkilled the wrapper but left an orphanedapp.pychild. Inspect what’s holding the port + the Prax processes:Then free the port and stop stragglers, confirm clean, and start one instance:fuser 5001/tcp ; pgrep -af app.pyfuser -k 5001/tcp # free the port pkill -9 -f "python3 app.py" # stop any lingering/reloader-thrashing app.py pgrep -af app.py ; ss -ltnp | grep 5001 # both should print nothing cd /home/ubuntu/PRAX/prax && nohup uv run --python 3.13 python app.py > .local-run/prax.log 2>&1 &pkill -f "app.py"is safe from an interactive shell (your shell’s command line doesn’t containapp.py) but not frombash -c "…app.py…", where the pattern matches the wrapper itself. Prefer this plain start overmake restart-praxwhile actively editing code — the latter runsDEBUG=true, whose reloader restarts on every file change. - Course/note URL 404 over ngrok: Course/note pages no longer auto-publish to ngrok — they’re served by TeamWork at
TEAMWORK_BASE_URLby default. To make a specific page publicly reachable, the user must explicitly opt in (e.g.course_publish(course_id, public=True)), which adds an entry toworkspaces/{user}/.shares.json. Useworkspace_list_sharesto inspect the registry. - Tailscale sidecar doesn’t start: Confirm both
TS_AUTHKEYandCOMPOSE_PROFILES=tailscaleare set in.env— withoutCOMPOSE_PROFILES, Compose silently skips the service. If it starts but doesn’t appear in the tailnet, checkdocker compose logs tailscalefor an auth error (most common cause: ephemeral or one-off key — must be reusable + non-ephemeral + pre-approved). - PDF extraction fails: Ensure Java 11+ is installed (
java -version). - LangChain provider errors:
prax/agent/llm_factory.pyvalidates missing API keys; double-check.env. - Sandbox won’t start: In Docker Compose mode, check
docker compose logs sandbox— the app waits for the sandbox health check. In local mode, verify Docker Desktop is running (docker info). Build the sandbox image:docker build -t prax-sandbox:latest sandbox/. - sandbox_install fails: Only works in Docker Compose mode (
RUNNING_IN_DOCKER=true). In local mode, install packages on your machine directly. - Shared file link returns 404: The file may have been deleted or the share token revoked. Re-publish with
workspace_share_file. - Schedule fires at wrong time: Check the
timezonefield inschedules.yaml. Use IANA names likeAmerica/Los_Angeles, not abbreviations likePST. - vLLM connection refused: Ensure vLLM is running with
--enable-loraandVLLM_BASE_URLpoints to it. - Training OOM: Reduce
FINETUNE_LORA_RANK(8 instead of 16) orFINETUNE_MAX_STEPS. QLoRA should fit in 6GB VRAM. - Browser login fails: Check
sites.yamlcredentials. For sites with CAPTCHAs or 2FA, usebrowser_request_loginfor VNC-based manual login instead. - VNC won’t connect: Ensure
Xvfbandx11vncare installed. Check the SSH tunnel:ssh -NL 5901:localhost:5901 server. VerifyBROWSER_VNC_ENABLED=trueandBROWSER_PROFILE_DIRis set. - Self-improve stuck in a loop: Prax is limited to 3 deploy attempts per branch. If it keeps failing, it will stop automatically. To manually clear the state: delete
.self-improve-state.yamlfrom the project root and restart the app. To rollback a broken deploy: tell Prax “rollback” or manually rungit revert HEAD(if the last commit starts withself-improve deploy:). - Self-improve PR fails: Ensure
ghCLI is authenticated (gh auth status) and the repo has a remote origin. - Plugin sandbox fails: The sandbox runs plugins in a subprocess of the same Python environment. If
langchain_coreor other dependencies aren’t installed, plugin tests will fail. Runuv syncto ensure all dependencies are available. - Plugin auto-rollback triggers unexpectedly: Check
plugin_status("name")to see the failure count and threshold. Adjustmax_failures_before_rollbackin the registry if needed. - Workspace push fails: Verify
PRAX_SSH_KEY_B64in.envand that a remote is set viaworkspace_set_remote. The key must be base64-encoded:cat ~/.ssh/prax_deploy_key | base64 | tr -d '\n'. Check that the deploy key has write access to the repo. The repo must be private — Prax refuses to push to public repos. - CATALOG.md not updating: The catalog regenerates on every
load_all()call (startup and after any hot-swap). Checkprax/plugins/tools/CATALOG.mdor the plugin repo’sCATALOG.md. - Discord bot not responding: Verify
DISCORD_BOT_TOKENis set and valid. Check that Message Content Intent is enabled in the Developer Portal. Ensure the user’s Discord ID is inDISCORD_ALLOWED_USERS. - Discord “Privileged intent” error: Go to Developer Portal → Bot tab → enable Message Content Intent under Privileged Gateway Intents.
TeamWork & Agent Status
-
Agent stuck as “working” in TeamWork UI / Agent World: The agent’s status in TeamWork didn’t get reset — usually because the app crashed or restarted mid-turn. The app resets all agents to idle on startup, but if the status is already stuck, restart the app:
docker compose restart prax. To manually reset a stuck agent via the API:# Find the project ID and agent ID curl -s http://localhost:8000/api/projects | python3 -m json.tool curl -s "http://localhost:8000/api/agents?project_id=PROJECT_ID" | python3 -m json.tool # Reset the stuck agent curl -X PATCH "http://localhost:8000/api/external/projects/PROJECT_ID/agents/AGENT_ID/status" \ -H "Content-Type: application/json" -d '{"status":"idle"}' -
Work Logs always empty (Total Logs: 0): Activity logs require both the TeamWork external API endpoint (
POST /api/external/projects/{id}/activity) and Prax pushing log entries. Ensure thepraxcontainer (which bundles TeamWork) is rebuilt after the latest changes:docker compose up --build prax. -
Live output says “Agent is idle” even when working: Prax pushes live output via
push_live_output()during tool execution. If the agent shows as working but live output is empty, the orchestrator’s callback handler may not be firing. Check app logs:docker compose logs prax --tail 50. -
Agent World constellation not updating: The constellation reads agent status from the
useAgents()hook which polls every 10 seconds. If an agent’s status changed but the visualization hasn’t updated, wait a few seconds. If it’s permanently stuck, see “Agent stuck as working” above. -
TeamWork shows “Claude Code” in output labels: This was a hardcoded label. After the fix, it shows the agent’s actual name (e.g., “Live Prax Output”). Rebuild the
praxcontainer (which bundles TeamWork) to pick up the change:docker compose up --build prax. -
Stale/renamed agent still visible in TeamWork: If you renamed or removed an agent role from the code but it still shows in chat, the constellation, or the sidebar, it’s because the old agent entry persists in TeamWork’s database. Delete it via the API:
# List agents to find the stale one PROJECT_ID="your-project-id" # from /api/projects curl -s "http://localhost:8000/api/agents?project_id=$PROJECT_ID" | python3 -m json.tool # Delete the stale agent by ID curl -X DELETE "http://localhost:8000/api/agents/AGENT_ID"
Docker & Infrastructure
-
dependency failed to start: container is unhealthy: Check which container is unhealthy:docker inspect --format='{{json .State.Health}}' prax-CONTAINER-1 | python3 -m json.tool. Common causes:- Ollama: The image doesn’t have
curlorwget. The healthcheck uses bash’s/dev/tcp. Ensure the compose file has the correct healthcheck. - Sandbox: the image is a pure-execution environment (no OpenCode/coding-agent server). If it reports unhealthy, check the container’s own healthcheck (shell/exec reachability, desktop processes) — the coding-agent server is no longer part of the image.
- Ollama: The image doesn’t have
-
Desktop / Browser tabs stuck or
Connection closed (code: 1006)in the console: The sandbox’swebsockify(port 6080) and CDP socat bridge (9223) stay listening even when the underlying Xvfb / x11vnc / Chromium processes die at startup — the sandbox entrypoint backgrounds them with&>/dev/null, so failures are silent and the container still reports healthy. Verify the desktop processes are actually running:docker compose exec sandbox ps -ef | grep -E 'Xvfb|x11vnc|chromium' | grep -v grepIf any are missing, restart the sandbox — most commonly a stale X11 lockfile (
/tmp/.X11-unix/X99) from an unclean shutdown blocks Xvfb:docker compose restart sandboxTo confirm the upstream WS is actually working after a restart, test from inside the
praxcontainer:docker compose exec prax python3 -c " import asyncio, websockets async def t(): async with websockets.connect('ws://sandbox:6080/websockify', subprotocols=['binary']) as ws: print('recv:', await asyncio.wait_for(ws.recv(), 3)) asyncio.run(t())"A healthy response starts with the RFB protocol version (
RFB 003.008).ConnectionClosedError ... 1011 Failed to connect to downstream servermeans websockify is up but x11vnc (port 5900) is not. -
.envvisible inside sandbox at/source/.env: The full repo is bind-mounted at/source/only during the gated, HIGH-risk self-improvement flow (Prax editing its own code natively). The everyday persistent sandbox mounts only/workspace. During self-improvement the.envfile is visible inside the sandbox — see sandbox-execution-boundary for the/source-mount exposure and its mitigations. -
Neo4j telemetry warning: Set
NEO4J_dbms_usage__report_enabled=falsein the Neo4j environment indocker-compose.yml(already done in the default config). -
Data lost after
docker compose down: All persistent data (memory, models, agent configs) is stored inWORKSPACE_DIR(default:../workspaces/), not Docker volumes. Only observability data (Tempo, Loki, Prometheus, Grafana) uses Docker volumes. Copy the workspace directory to migrate to a new machine.
Coding (native — no external coding agent)
Prax codes natively: run_python, workspace_save/workspace_patch
(syntax-linted), source_read/source_grep, and sandbox_shell. The
self-improvement flow is likewise native (self_improve_read/write/patch/test/ verify/deploy). The sandbox image no longer ships the OpenCode / Claude-Code /
Codex CLIs or a coding-agent server, and takes no model API keys.
-
Where did the coding-session tools go? The multi-round OpenCode coding-session tools (
sandbox_start/message/review/finish/abort/search/execute) and theSANDBOX_CODING_AGENT_ENABLEDflag were removed (2026-07).delegate_sandboxis still here, but it’s now a headless sub-agent that writes and runs code directly in the container viasandbox_shell— no session lifecycle, no rounds, no archive/replay. It’s registered wheneverSANDBOX_ENABLED. Prax also codes natively on the host (run_python,workspace_save/workspace_patch,source_read/source_grep). -
SELF_IMPROVE_ENABLEDis set but the self-improve tools don’t appear: Tools are registered at import time. Restart the app after changing.env:docker compose restart prax.
Memory System
-
Qdrant/Neo4j connection refused: Ensure the services are running:
docker compose ps. Data is stored inWORKSPACE_DIR/<PRAX_USER_ID>/.services/qdrant/andWORKSPACE_DIR/<PRAX_USER_ID>/.services/neo4j/. If the workspace directory doesn’t exist, create it:mkdir -p ../workspaces. -
Memory search returns no results: Check that
MEMORY_ENABLED=trueand that the embedding provider is configured. For Ollama embeddings, verify the model was pulled:docker compose logs ollama-init. -
Consolidation not running: Consolidation runs every
MEMORY_CONSOLIDATION_INTERVALseconds (default: 3600 = hourly). Check logs:docker compose logs prax | grep consolidation.