{"record":{"id":"96b5eeccd245a140","repo":"paperclipai/paperclip","slug":"instance-execution-policy-requires-the-kubernetes","errorCode":null,"errorMessage":"Instance execution policy requires the Kubernetes sandbox provider (executionMode=kubernetes) but no managed Kubernetes environment is configured for this company. Configure one (PAPERCLIP_K8S_* env on the cloud instance) before running agents; refusing to fall back to local execution.","messagePattern":"Instance execution policy requires the Kubernetes sandbox provider \\(executionMode=kubernetes\\) but no managed Kubernetes environment is configured for this company\\. Configure one \\(PAPERCLIP_K8S_\\* env on the cloud instance\\) before running agents; refusing to fall back to local execution\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/src/services/heartbeat.ts","lineNumber":14503,"sourceCode":"          run.scheduledRetryAttempt ??\n            INTERACTION_CONTINUATION_INFRA_MAX_ATTEMPTS,\n          INTERACTION_CONTINUATION_INFRA_MAX_ATTEMPTS,\n        ),\n        maxAttempts: INTERACTION_CONTINUATION_INFRA_MAX_ATTEMPTS,\n      }).catch((error) => {\n        logger.warn(\n          { err: error, runId: run.id, issueId },\n          \"failed to escalate non-retryable plan-approval resume failure\",\n        );\n      });\n      return null;\n    }\n\n    return scheduleBoundedRetryForRun(run, agent, {\n      retryReason: INTERACTION_CONTINUATION_INFRA_RETRY_REASON,\n      wakeReason: INTERACTION_CONTINUATION_INFRA_WAKE_REASON,\n      maxAttempts: INTERACTION_CONTINUATION_INFRA_MAX_ATTEMPTS,\n    });\n  }\n\n  async function promoteDueScheduledRetries(now = new Date()) {\n    const cutoff = await getWorktreeExecutionCutoff();\n    const result = await runDispatch.promoteDueScheduledRetries({ now, cutoff });\n    applyRunDispatchPostCommitEffects(result.postCommitEffects);\n    return { promoted: result.promoted, runIds: result.runIds };\n  }\n\n  async function getIssueRetryRun(\n    companyId: string,\n    issueId: string,\n    statuses: Array<\"scheduled_retry\" | \"queued\" | \"running\" | \"cancelled\">,\n  ) {\n    if (statuses.length === 0) return null;\n    return db\n      .select({\n        run: heartbeatRuns,","sourceCodeStart":14485,"sourceCodeEnd":14521,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/services/heartbeat.ts#L14485-L14521","documentation":"Error \"Instance execution policy requires the Kubernetes sandbox provider (executionMode=kubernetes) but no managed Kubernetes environment is configured for this company. Configure one (PAPERCLIP_K8S_* env on the cloud instance) before running agents; refusing to fall back to local execution.\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at server/src/services/heartbeat.ts:14430 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Configure a managed Kubernetes environment for the company (PAPERCLIP_K8S_* env on the cloud instance) before running agents."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}