Troubleshooting
Common Assembly Line failures, what they mean, and how to fix them.
Common failures, what they mean, and how to fix them. Setup steps live in Getting Started; every environment variable referenced here is defined in Runtime Configuration.
Quick Index
| Error | Section |
|---|---|
assembly-line: command not found | CLI Errors |
Unknown command: <cmd>. Run "assembly-line help" for usage. | CLI Errors |
Agent root not found: <path> | CLI Errors |
Hint: the model field in agent.md decides the required env var ... | Model And Provider Key Errors |
Model catalog unavailable. | Model And Provider Key Errors |
invalid-agent-graph | Agent Composition Errors |
agent.hook_evaluation_failed | Agent Composition Errors |
state.degraded | Agent Composition Errors |
Production Assembly Line Node runtime requires ASSEMBLY_LINE_ADMIN_TOKEN ... | 401, 403, And 429 From The HTTP API |
401 admin_auth_required / 403 admin_auth_invalid | 401, 403, And 429 From The HTTP API |
403 API run creation is disabled. | 401, 403, And 429 From The HTTP API |
429 Rate limited. / 429 Run capacity exhausted. Retry later. | 401, 403, And 429 From The HTTP API |
File-backed connection credential stores require ASSEMBLY_LINE_CONNECTION_STORE_SECRET ... | Connection Store Secrets |
<bin> not found. Install it, or pass the matching --*-bin flag | Deploy Preflight Failures |
Migration files are present, but no migration runner was configured. | Deploy Preflight Failures |
Failed to load plugin package ... | Deploy Preflight Failures |
403 scheduler_unauthorized | Webhooks And Scheduled Runs Rejected |
Production provider ingress requires webhook authentication: ... | Webhooks And Scheduled Runs Rejected |
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. Assembly Line requires Node
>=22.19.0(declared inengines). Checknode --versionand upgrade before reinstalling. pnpm assembly-linefails 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 Errors
assembly-line: command not found. The globalassembly-linebinary comes from the published@assemblyline-agents/sdknpm package. When it is not installed, including whenever you work from a source checkout, run the same commands through the repo workspace instead:pnpm assembly-line <command>resolves the built@assemblyline-agents/clibinary (runpnpm buildfirst).pnpm assembly-lineprints nothing useful. Runpnpm assembly-line helpfor the full command list orpnpm assembly-line help <command>(orpnpm assembly-line <command> --help) for per-command flags.Unknown command: <cmd>. Run "assembly-line help" for usage.Check the spelling againstpnpm assembly-line help; the help output is canonical. Provider-specifichostsandstatecommand namespaces no longer exist.Agent root not found: <path>. The positional argument (or--root) must point at an agent folder. Runassembly-line init <path>to scaffold one.
Model And Provider Key Errors
- A model run fails before the first response. The model prefix must resolve
an installed and locked model plugin. Inspect its declared authentication and
preflight requirements: the scaffolded
openrouter/*needsOPENROUTER_API_KEY, whileopenai/*needsOPENAI_API_KEY. openai-codex/*reports an authentication failure. Runassembly-line auth openai-codex <agentRoot> --status, then authenticate with the same command without--status. This provider uses Pi-native OAuth, notOPENAI_API_KEY, a Codex CLI, or a copied CLI login cache.- A build cannot resolve model capabilities. Check the
provider/modelspelling and provider connectivity. Providers with dynamic discovery resolve the ID directly. OpenRouter usesGET /api/v1/models. If discovery is offline, only that plugin's own static fallback can resolve the model; Pi has no bundled cross-provider catalog. - A turn rejects an image or video. The selected model's build-frozen metadata does not advertise the required input modality. Choose a model that supports that modality and rebuild so the manifest records its capabilities.
assembly-line modelscannot load a provider. Verify that the model plugin package is installed, selected by the agent, and unchanged from itsplugins.lockentry. Discovery belongs to that package, not Pi.
Agent Composition Errors
validatereportsinvalid-agent-graph. Inspect the nested message for the invalidagent.mdrule or plugin contribution. Declarative composition must reference compiled capabilities and stay withinmaxReasoning.- A run fails with
agent.hook_evaluation_failed. InspectGET /runs/:id/eventsfor the error and evaluation reason. Common causes include a dynamic plugin composition handler that does not select a model, conflicting singular selections, attempting a state write during composition, and exceeding the 50-snapshot limit. Keep composition handlers synchronous and side-effect free. Move I/O and state writes into tools or event handlers. - The host logs
state.degradedwithagentStateorconversationTurns. The configured state backend omitted those optional facets, so the runtime is using in-memory fallbacks. Runs still work, but hook state or queued conversation turns will not survive a restart. Implement those facets or use the file or Postgres state adapter before production.
Build Artifacts And .assembly-line Churn
- A command fails while rebuilding an example's
.assembly-line/directory. Point the artifact somewhere disposable with--out /private/tmp/assembly-line-minimal(supported bybuild,run,dev,serve, anddeploy), or delete the generated.assembly-line/directory and rebuild. - Example artifacts pile up.
pnpm clean:artifactsremoves ignoredexamples/**/.assembly-linedirectories;pnpm cleanremoves packagedist/output;pnpm clean:tmpremovesassembly-line-*temp directories. - Generated files show up in
git status..assembly-line/,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.
401, 403, And 429 From The HTTP API
- Production boot fails with
Production Assembly Line Node runtime requires ASSEMBLY_LINE_ADMIN_TOKEN or a host-provided auth policy to protect control-plane routes.SetASSEMBLY_LINE_ADMIN_TOKEN(or pass anauthpolicy from host code). Localassembly-line 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 <ASSEMBLY_LINE_ADMIN_TOKEN>in production.403 API run creation is disabled.ProductionPOST /runsis off by default. SetASSEMBLY_LINE_ENABLE_API_RUNS=trueand authenticate with the admin token; leave it off unless API-triggered runs are intended.429 { "error": "Rate limited." }. Ingress rate limiting is enabled (ASSEMBLY_LINE_INGRESS_RATE_LIMIT/ASSEMBLY_LINE_RUNS_RATE_LIMITor the hostrateLimitoption). TheRetry-Afterheader says when to retry.429 Run capacity exhausted. Retry later.The run concurrency cap (ASSEMBLY_LINE_MAX_CONCURRENT_RUNS, production default 16) rejected a direct run such asPOST /runs. Accepted provider webhooks are durably queued per conversation and do not return this capacity error.- Load balancer keeps routing during deploys. Point readiness at
GET /readyz. It returns503 { "draining": true }during graceful shutdown. Use/healthor/healthzfor liveness; both stay200. DeliverSIGTERMso in-flight runs drain withinASSEMBLY_LINE_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 ASSEMBLY_LINE_CONNECTION_STORE_SECRET or ASSEMBLY_LINE_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 fromagent.mdprofiles, channels, selected plugin connections and tools, and the model prefix. Satisfy every required item before publishing.- Railway: requires
RAILWAY_TOKEN(or an authenticated Railway CLI) and a linked project/service, provider environment IDs, ordeploy.railway.projectanddeploy.railway.service. - Docker: requires Docker locally; set an explicit image with
deploy.docker.imagewhen needed. - Fly: requires
FLY_API_TOKENanddeploy.fly.apporFLY_APP_NAME. - VPS: requires a named
assembly-line.hosts.jsonentry, a verifiedSHA256:SSH host-key fingerprint, the inventory-selected identity-file environment variable, supported AMD64 Ubuntu 24.04/26.04 or Debian 12, Docker Compose, and available ports 80/443. Create or adopt a Hetzner host through the VPS plugin'sbootstrapHetznerHost()operator API, or register a pre-hardened host directly. The package verifies cloud-init, Docker, UFW, fail2ban, and unattended upgrades. First deploys need--sync-secretsunless a complete remote runtime environment already exists. SSH host-key fingerprint mismatch: verify the new fingerprint through the provider console or another trusted path. Do not replace the pin based only on the key returned by the same network connection.- A VPS release rolls back after readiness: inspect the blue/green runtime
containers and
assembly-line-caddyon the host. Assembly Line restores the previous route when container health, Caddy validation/reload, or public HTTPS/readyzfails. - A derived hostname is already owned: another deployment has the
host-local ownership claim. Confirm that agent IDs and environments are
unique within the host namespace, then run
deploy --ingress-only; never delete ownership files merely to bypass the collision. Ingress reconciliation retains the old claim until the new Caddy route passes public readiness and rolls the new claim back on failure. - A prepared release cannot activate:
--activateis revision-fenced. Run it from the same agent revision that produced--prepare-only. If another prepare superseded it, prepare the intended revision again. - Postgres image mismatch: ordinary deployment refuses to recreate the
cluster under a different image. Review downtime and backups, then execute
the VPS plugin's reviewed
hostPostgresUpgradeScript()operator workflow. - Postgres transfer verification failed: Assembly Line compares normalized schema and exact per-table counts and restores the pre-transfer target on failure. Keep the source quiesced, inspect the reported failure, and do not resume traffic until a later verified transfer succeeds.
<bin> not found. The deploy path shells out torailway,docker,flyctl, or the VPS SSH client; install the binary or set the selected deploy plugin's typed*BinYAML option.Migration files are present, but no migration runner was configured.The artifact contains.assembly-line/migrations; pass--migration-commandor setASSEMBLY_LINE_MIGRATION_COMMAND.- Unknown provider profile:
agent.mdaccepts only the reviewed profile catalog. Use a scalar profile or its documented single-key mapping from the Declarative Reference.
Webhooks And Scheduled Runs Rejected
403 scheduler_unauthorizedon/assembly-line/automations/tick. SetASSEMBLY_LINE_SCHEDULER_SECRETand send it asAuthorization: Bearer <secret>orx-assembly-line-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.
Runs Stuck, Deliveries Missing, Sandbox Writes Lost
- Deliveries sit in
pendingand never send. The delivery worker drains the durable queue; check thatASSEMBLY_LINE_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 toASSEMBLY_LINE_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 everyASSEMBLY_LINE_RUN_RECOVERY_INTERVAL_MS; the kill-switch isASSEMBLY_LINE_RUN_RECOVERY=false. - A tool module or other run dependency fails before the first model
request. Current runtimes fail the run immediately with
run.initialization_failedand queue a failure notice unless the harness already saved a resumable continuation. If an ordinary initialization error instead remainsrunninguntil orphan recovery, update the deployed runtime package. - A sandboxed tool reports
ENOENTfor a neighboring template, script, stylesheet, schema, or binary. Import the required asset from the tool's module so it is included in the self-contained sandbox bundle; undeclared neighboring files are intentionally excluded. See Tools: Execution Model. - Sandbox writes (memory, skills,
/workspacefiles) not persisting. The sandbox-sync worker (ASSEMBLY_LINE_SANDBOX_SYNC_WORKER) performs the writeback; usesandboxSyncDiagnostics()andinspectSandboxSyncJob(jobId)to see due/leased/expired/blocked jobs, andretrySandboxSyncJob(jobId)after fixing a blocked one. - A sandbox reports
/home/user,/root, or another cwd instead of/workspace. Current built-in hosted adapters reject that session during initialization; do not rewrite command strings or add a symlink in agent code. Confirm the deployment contains the current adapter packages and inspect its provider metadata forassembly-line.filesystemContractVersion. Sandboxes without the current version are deliberately not reconnected. workingDirectory must be /workspace. Remove the alias or set it to/workspace. The field cannot remap absolute paths embedded in shell commands. For local testing of those absolute paths, use Docker instead of the Local adapter.- Kill-switches for debugging:
ASSEMBLY_LINE_DELIVERY_WORKER,ASSEMBLY_LINE_SANDBOX_SYNC_WORKER, andASSEMBLY_LINE_RUN_RECOVERYeach acceptfalse/0. Every background behavior has one; see the tables in Runtime And Deployment.
Still Stuck?
Inspect the durable record: .assembly-line/manifest.json,
.assembly-line/preflight.json, and .assembly-line/route-table.json for compile-time
surprises. Use GET /runs/:id/events (or the state file in development) for
runtime behavior. Every model step, tool call, pause, delivery attempt, and
recovery action is recorded as an event.