{"record":{"id":"b52d8fd52bc9b0a2","repo":"vercel/ai","slug":"invalid-argument-for-parameter-requests-request-i","errorCode":null,"errorMessage":"Invalid argument for parameter requests: request IDs must not be empty","messagePattern":"Invalid argument for parameter requests: request IDs must not be empty","errorType":"validation","errorClass":"InvalidArgumentError","httpStatus":null,"severity":"error","filePath":"packages/ai/src/batch/batch.ts","lineNumber":257,"sourceCode":"    typeof candidate.experimental_doGetBatchStatus === 'function' &&\n    typeof candidate.experimental_doGetBatchResults === 'function'\n  );\n}\n\nfunction validateRequests(requests: ReadonlyArray<TextBatchRequest>) {\n  if (requests.length === 0) {\n    throw new InvalidArgumentError({\n      parameter: 'requests',\n      value: requests,\n      message: 'requests must not be empty',\n    });\n  }\n\n  const ids = new Set<string>();\n\n  for (const request of requests) {\n    if (request.id.trim().length === 0) {\n      throw new InvalidArgumentError({\n        parameter: 'requests',\n        value: requests,\n        message: 'request IDs must not be empty',\n      });\n    }\n\n    if (ids.has(request.id)) {\n      throw new InvalidArgumentError({\n        parameter: 'requests',\n        value: requests,\n        message: `request IDs must be unique; duplicate ID \"${request.id}\"`,\n      });\n    }\n\n    ids.add(request.id);\n  }\n}\n","sourceCodeStart":239,"sourceCodeEnd":275,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/ai/src/batch/batch.ts#L239-L275","documentation":"As part of validateACPLifecycleCompatibility, the persisted lifecycleData.implementationIdentity is compared with the identity of the implementation (e.g. the agent binary/version) configured in the current harness. If they differ, the lifecycle state was created by a different implementation and cannot be safely resumed.","triggerScenarios":"Resuming ACP lifecycle state after the underlying agent implementation (binary, version, identity string) changed; passing state captured with one agent version into a harness configured with another; upgrading the agent CLI between turns.","commonSituations":"The agent binary was auto-upgraded between the original turn and the resume; switching between agent distributions (stable vs canary) for the same session; pointing the harness at a different executable path.","solutions":["Resume the lifecycle state with the same implementation identity (same agent binary/version) that produced it.","Reinstall or pin the agent binary to the version recorded in lifecycleData.implementationIdentity.","Start a fresh session if you intend to use the new implementation version."],"exampleFix":"// before\n// lifecycle captured with claude-code 1.2.0, binary now upgraded to 1.3.0\ncreateACPV1({ implementation: claudeCode130, lifecycle: state })\n\n// after\ncreateACPV1({ implementation: claudeCode120, lifecycle: state })","handlingStrategy":"validation","validationCode":"if (lifecycleData.implementationIdentity !== configuredImplementation.identity) {\n  throw new Error('Implementation changed; cannot resume lifecycle state');\n}","typeGuard":null,"tryCatchPattern":"try {\n  harness = createACPV1({ implementation, lifecycle: state });\n} catch (error) {\n  if (error instanceof Error && error.message.includes('incompatible with the configured implementation')) {\n    // agent version drifted: either pin the old binary or start a new session\n    harness = createACPV1({ implementation, lifecycle: undefined });\n  } else {\n    throw error;\n  }\n}","preventionTips":["Pin the agent binary/version (package-lock, container image digest) while any session may be resumed.","Record implementationIdentity next to persisted state and check it before resume.","Disable auto-updates of the agent CLI in environments that resume sessions."],"tags":["acp","lifecycle","implementation-version","session-resume"],"backgroundTag":"lifecycle-state-mismatch","analyzedSha":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}