Troubleshooting
Common failures, what they mean, and how to fix them. Setup steps live in Getting Started; every environment variable referenced here is defined in the Configuration Reference.
Install And Build Failures
pnpm installfails or picks the wrong pnpm. The repo pinspnpm@10.xthrough thepackageManagerfield. Use Corepack instead of a globally installed pnpm:corepack enable, thencorepack pnpm install.- Engine errors during install. OpenEve requires Node
>=22.19.0(declared inengines). Checknode --versionand upgrade before reinstalling. pnpm openevefails with a module-not-found error. The CLI runs from built output; runpnpm buildfirst. This also applies after pulling changes that touch anypackages/*/src.- Typecheck or tests fail on a fresh clone. Run in order:
pnpm install,pnpm build,pnpm check,pnpm test.
CLI Not Found
openeve: command not found. The packages are not yet published to npm, so there is no globalopenevebinary to install. Inside this repo, runpnpm openeve <command>— the root workspace depends on@openeve/cli, so pnpm resolves the built workspace binary.pnpm openeveprints nothing useful. Runpnpm openeve helpfor the full command list orpnpm openeve help <command>(orpnpm openeve <command> --help) for per-command flags.Unknown command: <cmd>. Run "openeve help" for usage.Check the spelling againstpnpm openeve help; commands areinit,add,validate,manifest,build,dev,run,serve,channels,deploy,models, andhelp.Agent root not found: <path>. The positional argument (or--root) must point at an agent folder. Runopeneve init <path>to scaffold one.
Model And Provider Key Errors
- A model run fails before the first response. The model prefix in
agent.tsdecides the required env var:openai/*needsOPENAI_API_KEY,anthropic/*needsANTHROPIC_API_KEY, and so on (full table in Runtime And Deployment). The CLI prints the same hint when a provider auth error reaches the top level:Hint: the model prefix in agent.ts decides the required env var (e.g. openai/* needs OPENAI_API_KEY). validatewarnsunknown-model. The model inagent.tsis not in the local model catalog. It is a warning, never an error — custom providers still work at runtime — so first check for typos.pnpm openeve modelslists the catalog (--provider openaifilters);--no-model-checkskips the check entirely.openeve modelsprintsModel catalog unavailable.The catalog comes from@openeve/pi; make sure the workspace is built (pnpm build). When the catalog cannot load,validatesilently skips the model check rather than failing.
Build Artifacts And .openeve Churn
- A command fails while rebuilding an example's
.openeve/directory. Point the artifact somewhere disposable with--out /private/tmp/openeve-minimal(supported bybuild,run,dev,serve, anddeploy), or delete the generated.openeve/directory and rebuild. - Example artifacts pile up.
pnpm clean:artifactsremoves ignoredexamples/**/.openevedirectories;pnpm cleanremoves packagedist/output;pnpm clean:tmpremovesopeneve-*temp directories. - Generated files show up in
git status..openeve/,dist/,node_modules/, and env files are local build output and should stay out of commits. - A rebuild did not restart
dev --watch. Restarts only happen when the agent revision changes; the CLI printsRebuilt: no manifest change; keeping the running server.for cosmetic edits. While the folder is invalid, the previous server keeps serving and the CLI prints the validation issues until the folder is valid again.
Serve And Control-Plane Auth
- Production boot fails with
Production OpenEve Node runtime requires OPENEVE_ADMIN_TOKEN or a host-provided auth policy to protect control-plane routes.SetOPENEVE_ADMIN_TOKEN(or pass anauthpolicy from host code). Localopeneve serveruns in dev mode, where inspection endpoints are open; a deployed artifact boots in production mode. 401 admin_auth_required/403 admin_auth_invalid./manifest,/routes, and the/runs*inspection endpoints requireAuthorization: Bearer <OPENEVE_ADMIN_TOKEN>in production.403 API run creation is disabled.ProductionPOST /runsis off by default. SetOPENEVE_ENABLE_API_RUNS=trueand authenticate with the admin token; leave it off unless API-triggered runs are intended.- Load balancer keeps routing during deploys. Point readiness at
GET /readyz— it returns503 { "draining": true }during graceful shutdown — and liveness at/healthor/healthz, which stay200. DeliverSIGTERMso in-flight runs drain withinOPENEVE_SHUTDOWN_TIMEOUT_MS(default 30s); a second signal exits immediately.
Connection Store Secrets
File-backed connection credential stores are encrypted, and production boot validates the secret:
File-backed connection credential stores require OPENEVE_CONNECTION_STORE_SECRET or OPENEVE_SECRET outside dev mode.Set one of the two, or use Postgres state (the Postgres adapter implements the grant stores directly and needs no file secret).... must be at least 32 characters outside dev mode.The secret has a hard 32-character minimum in production.... cannot use the local development secret outside dev mode.The built-in dev fallback value is rejected in production; generate a real secret.
Rotating the secret makes previously encrypted grant files unreadable — plan rotation as a re-authorization event.
Deploy Preflight Failures
deploy --dry-runreports missing setup. Each preflight item names a required env var or provider setup step inferred fromgateway.ts, channels, connections, and the model prefix. Satisfy every required item before publishing.- Railway: requires
RAILWAY_TOKEN(or an authenticated Railway CLI) and a linked project/service or explicit--railway-projectand--railway-service. - Docker (preview): requires Docker locally; the image tag comes from
--docker-imageorOPENEVE_DOCKER_IMAGE. - Fly (preview): requires
FLY_API_TOKENand--fly-apporFLY_APP_NAME(Fly deploys require --fly-app or FLY_APP_NAME.). <bin> not found. Install it, or pass the matching --*-bin flag. The deploy path shells out torailway,docker, orflyctl; install the binary or point--railway-bin/--docker-bin/--fly-binat it.Migration files are present, but no migration runner was configured.The artifact contains.openeve/migrations; pass--migration-commandor setOPENEVE_MIGRATION_COMMAND.- Third-party providers: a
provider-package-unresolvedvalidation warning means the compiler could not import thepackageNamegiven toadapter(kind, opts, { package })from the agent root, so preflight falls back to a generic requirement. Install the package where the agent builds. At boot, the Node host re-resolves it and fails with a specific error when the package is missing (Failed to load provider package ...), does not exportopeneveProvider, or has no registration for the role/kind. See Authoring Adapters.
Scheduler And Channel Ingress
403 scheduler_unauthorizedon/openeve/scheduler/tick. SetOPENEVE_SCHEDULER_SECRETand send it asAuthorization: Bearer <secret>orx-openeve-scheduler-secret. Without a configured secret the endpoint only accepts dev-mode requests.- Production boot fails with
Production provider ingress requires webhook authentication: .... A channel declared ingress secrets (ingress.requiredSecretEnv, any-of groups) and none of its groups is fully set — for example Telegram needsTELEGRAM_WEBHOOK_SECRET, and Photon needs a signing secret or a bearer token. Dev mode logs a warning instead of failing. Set the secrets named in the error. - Webhooks return
401even though boot succeeded. Boot checks that the secrets exist; each request is still verified by the channel module (for example Telegram comparesx-telegram-bot-api-secret-tokenconstant-time). Make sure the provider-side webhook config sends the same secret. 429 { "error": "Rate limited." }. Ingress rate limiting is enabled (OPENEVE_INGRESS_RATE_LIMIT/OPENEVE_RUNS_RATE_LIMITor the hostrateLimitoption). TheRetry-Afterheader says when to retry.429 Run capacity exhausted. Retry later.The run concurrency cap (OPENEVE_MAX_CONCURRENT_RUNS, production default 16) rejected a brand-new run. Capacity is checked before the event's idempotency key is consumed, so provider retries succeed once load drops.
Durability Workers And Recovery
- Deliveries sit in
pendingand never send. The delivery worker drains the durable queue; check thatOPENEVE_DELIVERY_WORKERis not set tofalse/0and that the host calledstartBackgroundWorkers()(listenNodeRuntimedoes this automatically). - A run completed but the user got no message yet. A retryable send
failure defers the delivery instead of failing the run: the run event log
shows
delivery.deferredwith the error, attempt count, andnextAttemptAt, and the worker retries with backoff up toOPENEVE_DELIVERY_QUEUE_MAX_ATTEMPTS(default 5) before a terminaldelivery.failed. - Runs stuck in
runningafter a crash or redeploy. Orphan recovery sweeps runs stale pastmax(5min, 4x heartbeat): already-delivered runs complete, runs with a continuation checkpoint get one resume attempt, runs with a model response get a real pending delivery, and everything else is markedfailed. It runs at boot and everyOPENEVE_RUN_RECOVERY_INTERVAL_MS; the kill-switch isOPENEVE_RUN_RECOVERY=false. - Sandbox writes (memory, skills,
/workspacefiles) not persisting. The sandbox-sync worker (OPENEVE_SANDBOX_SYNC_WORKER) performs the writeback; usesandboxSyncDiagnostics()andinspectSandboxSyncJob(jobId)to see due/leased/expired/blocked jobs, andretrySandboxSyncJob(jobId)after fixing a blocked one. - Kill-switches for debugging:
OPENEVE_DELIVERY_WORKER,OPENEVE_SANDBOX_SYNC_WORKER, andOPENEVE_RUN_RECOVERYeach acceptfalse/0. Every background behavior has one; see the tables in Runtime And Deployment.
Still Stuck?
Inspect the durable record: .openeve/manifest.json,
.openeve/preflight.json, and .openeve/route-table.json for compile-time
surprises; GET /runs/:id/events (or the state file in dev) for runtime
behavior — every model step, tool call, pause, delivery attempt, and recovery
action is recorded as an event.