{"record":{"id":"e9ba9582e67472e8","repo":"paperclipai/paperclip","slug":"turnstarttimeoutms-must-be-a-positive-safe-integer","errorCode":null,"errorMessage":"turnStartTimeoutMs must be a positive safe integer","messagePattern":"turnStartTimeoutMs must be a positive safe integer","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/paperclip-runner/src/live/runnerd-codex-transport.ts","lineNumber":5479,"sourceCode":"        },\n        ...(call.sourceEventId && call.sourceEventType\n          ? {\n              paperclipTrace: {\n                sourceEventId: call.sourceEventId,\n                sourceEventType: call.sourceEventType,\n              },\n            }\n          : {}),\n      }),\n    );\n  }\n\n  async #startTurn(\n    params: Record<string, unknown>,\n  ): Promise<Record<string, unknown>> {\n    const turnStartTimeoutMs = this.options.turnStartTimeoutMs ?? 30_000;\n    if (!Number.isSafeInteger(turnStartTimeoutMs) || turnStartTimeoutMs <= 0) {\n      throw new Error(\"turnStartTimeoutMs must be a positive safe integer\");\n    }\n    const commandDeadline = Date.now() + turnStartTimeoutMs;\n    const input = Array.isArray(params.input) ? params.input.map(record) : [];\n    const message = input\n      .filter((item) => item.type !== \"skill\")\n      .map((item) => (typeof item.text === \"string\" ? item.text : \"\"))\n      .join(\"\\n\");\n    const skills = resolveRunnerdCodexSkillInputs(\n      input.filter((item) => item.type === \"skill\"),\n      this.options.runtimeContext ?? null,\n      resolve(this.options.runnerFilesystemRoot ?? this.#root, \"codex-home\"),\n    );\n    if (skills.length && (this.options.provider ?? \"codex\") !== \"codex\") {\n      throw new Error(\"Explicit skill inputs are supported only by Codex\");\n    }\n    const pendingTurnId = `turn_lab_${randomUUID().replaceAll(\"-\", \"\")}`;\n    this.#turnId = pendingTurnId;\n    const responseEpoch = ++this.#turnStartResponseEpoch;","sourceCodeStart":5461,"sourceCodeEnd":5497,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/packages/paperclip-runner/src/live/runnerd-codex-transport.ts#L5461-L5497","documentation":"Options guard in #startTurn of the runnerd Codex transport: the configured turnStartTimeoutMs (default 30000) is not a positive safe integer. This is a configuration error in the transport options object, validated before any turn is started.","triggerScenarios":"Thrown at packages/paperclip-runner/src/live/runnerd-codex-transport.ts:5299 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set turnStartTimeoutMs to a positive integer below Number.MAX_SAFE_INTEGER","Remove the option to use the 30s default","Fix the config source that produced NaN, zero, negative, or fractional values"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3f1d897a7c018d76563a21c6e39c3c9b03933622","analyzedAt":"2026-09-10T03:14:50.855Z","contentChangedAt":"2026-09-10T03:14:50.855Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}