{"record":{"id":"256962de670b243a","repo":"paperclipai/paperclip","slug":"invalid-paperclip-instance-id-instanceid","errorCode":null,"errorMessage":"Invalid PAPERCLIP_INSTANCE_ID '${instanceId}'.","messagePattern":"Invalid PAPERCLIP_INSTANCE_ID '(.+?)'\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/adapter-utils/src/server-utils.ts","lineNumber":169,"sourceCode":"const PATH_SEGMENT_RE = /^[a-zA-Z0-9_-]+$/;\nconst SENSITIVE_ENV_KEY =\n  /(key|token|secret|password|passwd|authorization|cookie)/i;\nconst REDACTED_LOG_VALUE = \"***REDACTED***\";\n\n// PAPERCLIP_* is the reserved runtime namespace: these vars are generated by\n// Paperclip per run (identity, wake, workspace, API access). Adapter/user\n// config env must never override them.\nexport function isPaperclipRuntimeEnvKey(key: string): boolean {\n  return key.startsWith(\"PAPERCLIP_\");\n}\n\n// PAPERCLIP_API_KEY is never accepted from adapter/user config env: the\n// harness-minted run token is the only source of Paperclip API identity.\n// Other PAPERCLIP_*-named config keys are allowed as long as Paperclip has\n// not assigned the same key for the run (runtime vars always win).\nexport function isForbiddenConfigEnvKey(key: string): boolean {\n  return key === \"PAPERCLIP_API_KEY\";\n}\nconst PAPERCLIP_SKILL_ROOT_RELATIVE_CANDIDATES = [\n  \"../../skills\",\n  \"../../../../../skills\",\n];\nconst MATERIALIZED_SKILL_SENTINEL = \".paperclip-materialized-skill.json\";\nconst MATERIALIZED_SKILL_LOCK_OWNER = \"owner.json\";\nconst MATERIALIZED_SKILL_LOCK_STALE_MS = 30_000;\n\nfunction expandHomePrefix(value: string): string {\n  if (value === \"~\") return os.homedir();\n  if (value.startsWith(\"~/\")) return path.resolve(os.homedir(), value.slice(2));\n  return value;\n}\n\nexport function resolvePaperclipInstanceRootForAdapter(\n  input: {\n    homeDir?: string;\n    instanceId?: string;","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/packages/adapter-utils/src/server-utils.ts#L151-L187","documentation":"Error \"Invalid PAPERCLIP_INSTANCE_ID '${instanceId}'.\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at packages/adapter-utils/src/server-utils.ts:154 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set PAPERCLIP_INSTANCE_ID to a valid instance id value."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3f1d897a7c018d76563a21c6e39c3c9b03933622","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}