{"record":{"id":"7594e11dcd207502","repo":"paperclipai/paperclip","slug":"eval-session-agentcoreprofile-requires-provider-aw","errorCode":null,"errorMessage":"eval-session agentCoreProfile requires provider aws_agentcore","messagePattern":"eval-session agentCoreProfile requires provider aws_agentcore","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/paperclip-runner/src/cli/eval-session-contract.ts","lineNumber":267,"sourceCode":"    throw new Error(\"eval-session acpxAgent requires provider acpx\");\n  }\n  const managedProfileInput = input.managedProfile === null\n    ? undefined\n    : input.managedProfile;\n  const agentCoreProfileInput = input.agentCoreProfile === null\n    ? undefined\n    : input.agentCoreProfile;\n  const managedProfile = provider === \"claude_managed\"\n    ? parseManagedProfile(managedProfileInput)\n    : undefined;\n  const agentCoreProfile = provider === \"aws_agentcore\"\n    ? parseAgentCoreProfile(agentCoreProfileInput)\n    : undefined;\n  if (provider !== \"claude_managed\" && managedProfileInput !== undefined) {\n    throw new Error(\"eval-session managedProfile requires provider claude_managed\");\n  }\n  if (provider !== \"aws_agentcore\" && agentCoreProfileInput !== undefined) {\n    throw new Error(\"eval-session agentCoreProfile requires provider aws_agentcore\");\n  }\n  if (input.nativeResume !== undefined) {\n    throw new Error(\n      \"eval-session nativeResume requires a retained live-session checkpoint\",\n    );\n  }\n  if (input.includeCollaborationModeInstructions === false) {\n    throw new Error(\n      \"current CapabilityLiveSessionService requires collaboration-mode instructions\",\n    );\n  }\n\n  const runnerd = object(input.runnerd, \"request.runnerd\");\n  const digest = text(runnerd.sha256, \"request.runnerd.sha256\");\n  if (!/^(?:sha256:)?[a-f0-9]{64}$/i.test(digest)) {\n    throw new Error(\"request.runnerd.sha256 must be a SHA-256 digest\");\n  }\n  const limits = object(input.limits, \"request.limits\");","sourceCodeStart":249,"sourceCodeEnd":285,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/packages/paperclip-runner/src/cli/eval-session-contract.ts#L249-L285","documentation":"parseEvalSessionRequest in packages/paperclip-runner/src/cli/eval-session-contract.ts is a fail-closed validator for eval-session requests at the runner executable boundary. It throws this error when the request includes an agentCoreProfile field but the provider field is not \"aws_agentcore\". The profile bundle (ARNs, memory, context bucket, cost/iteration limits) is only meaningful for AWS AgentCore sessions, so pairing it with any other provider is rejected rather than silently ignored.","triggerScenarios":"Calling parseEvalSessionRequest (or the eval-session CLI 'request' path) with provider set to codex/opencode/claude_managed/acpx while also passing input.agentCoreProfile (even if it is an empty object).","commonSituations":"Copy-pasting a request template from an AWS AgentCore eval and switching provider without removing agentCoreProfile; a config generator that always emits agentCoreProfile regardless of provider; leftover fields after migrating a session from aws_agentcore to another provider.","solutions":["Remove the agentCoreProfile field from the request when provider is not aws_agentcore.","Set provider to \"aws_agentcore\" if the AWS AgentCore profile is actually intended (and include the required agentCoreProfile fields plus model global.anthropic.claude-sonnet-4-6).","Fix the request-building code/config to only emit agentCoreProfile when provider === \"aws_agentcore\"."],"exampleFix":"// before\n{ \"provider\": \"claude_managed\", \"agentCoreProfile\": { \"memoryId\": \"...\" }, ... }\n// after\n{ \"provider\": \"claude_managed\", \"managedProfile\": { ... }, ... }","handlingStrategy":"validation","validationCode":"function hasNoAgentCoreProfile(input) { return input.agentCoreProfile === undefined || input.provider === \"aws_agentcore\"; }\nif (!hasNoAgentCoreProfile(req)) throw new Error(\"agentCoreProfile requires provider aws_agentcore\");","typeGuard":"function isAgentCoreRequest(input) { return input.provider === \"aws_agentcore\" && typeof input.agentCoreProfile === \"object\"; }","tryCatchPattern":"try { return parseEvalSessionRequest(raw); } catch (e) { if (String(e.message).includes(\"agentCoreProfile requires provider aws_agentcore\")) { delete raw.agentCoreProfile; return parseEvalSessionRequest(raw); } throw e; }","preventionTips":["Build requests with a provider-specific factory that only emits agentCoreProfile for aws_agentcore.","Validate request payloads against the eval-session contract before sending.","Never copy agentCoreProfile blocks across provider templates."],"tags":["validation","config","request-contract"],"backgroundTag":"provider-field-mismatch","analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-09-10T03:14:50.855Z","contentChangedAt":"2026-09-10T03:14:50.855Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}