Troubleshooting & FAQ
When something breaks, start here. This section covers the most common issues encountered during development, deployment, and operation of Foundry.
Common Issues Top 10 issues and their solutions — auth failures, missing env vars, sandbox problems, slow queries, and more.
Quick diagnostics
Section titled “Quick diagnostics”Before diving into specific issues, run these checks:
Is the backend healthy?
Section titled “Is the backend healthy?”# Check Convex dev is runningbunx convex dev # should show "Ready" with no errors
# Check function logs for recent errors# Open Convex Dashboard → Logs tabAre the workers reachable?
Section titled “Are the workers reachable?”# Agent worker health checkcurl http://localhost:3001/health # localcurl https://foundry-agent-worker.<account>.workers.dev/health # production
# Sandbox worker (production only)curl https://migration-sandbox-worker.<account>.workers.dev/healthAre environment variables set?
Section titled “Are environment variables set?”# Check Convex env varsbunx convex env list
# Check Cloudflare secretscd agent-worker && wrangler secret listcd sandbox-worker && wrangler secret listIs auth working?
Section titled “Is auth working?”Open the browser console and check for:
"Not authenticated"errors — Clerk env vars missing or JWT expired"Access denied"errors — wrong organization selected orassertOrgAccessfailure- WebSocket disconnection warnings — Convex URL incorrect or backend not running
Where to find logs
Section titled “Where to find logs”| Service | Log Location |
|---|---|
| Next.js frontend | Browser console + Vercel function logs |
| Convex backend | Convex Dashboard -> Logs tab |
| Agent worker (local) | Terminal running bun run dev:agent |
| Agent worker (prod) | cd agent-worker && wrangler tail |
| Sandbox worker | cd sandbox-worker && wrangler tail |
| Clerk | Clerk Dashboard -> Logs |
| GitHub webhooks | GitHub App -> Advanced -> Recent deliveries |