{"record":{"id":"88ae5b24c3c35829","repo":"vercel/ai","slug":"the-sandbox-implementation-does-not-support-config","errorCode":null,"errorMessage":"The sandbox implementation does not support configuring request transformations, so credential brokering does not work. Falling back to less secure credential forwarding.","messagePattern":"The sandbox implementation does not support configuring request transformations, so credential brokering does not work\\. Falling back to less secure credential forwarding\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/harness/src/utils/sandbox-credential-brokering.ts","lineNumber":15,"sourceCode":"import { randomBytes } from 'node:crypto';\nimport type { HarnessV1RequestTransformation } from '../v1';\n\nconst SANDBOX_CREDENTIAL_PLACEHOLDER_PREFIX = 'aisdkhc_';\n\nexport function generateSandboxCredentialPlaceholder(): string {\n  return `${SANDBOX_CREDENTIAL_PLACEHOLDER_PREFIX}${randomBytes(32).toString('base64url')}`;\n}\n\nexport function isSandboxCredentialPlaceholder(value: string): boolean {\n  return /^aisdkhc_[A-Za-z0-9_-]{43}$/.test(value);\n}\n\nexport function warnCredentialBrokeringUnavailable(): void {\n  console.warn(\n    'The sandbox implementation does not support configuring request transformations, so credential brokering does not work. Falling back to less secure credential forwarding.',\n  );\n}\n\nexport function maskSandboxCredentials({\n  environment,\n  credentialEnvironmentVariables,\n}: {\n  environment: Readonly<Record<string, string>>;\n  credentialEnvironmentVariables: ReadonlyArray<string>;\n}): Record<string, string> {\n  const maskedEnvironment = { ...environment };\n  for (const name of credentialEnvironmentVariables) {\n    if (maskedEnvironment[name] != null) {\n      maskedEnvironment[name] = name;\n    }\n  }\n  return maskedEnvironment;","sourceCodeStart":1,"sourceCodeEnd":33,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/harness/src/utils/sandbox-credential-brokering.ts#L1-L33","documentation":"This warning is emitted when credential brokering is requested in a sandboxed execution environment that cannot install request transformations (which are required to swap credential placeholders for real credentials at request time). The library falls back to forwarding real credentials directly to tools, which is functional but less secure. It is a console.warn, not a thrown exception.","triggerScenarios":"Creating a harness agent (createACPV1, createClaudeCode, createCodex, createDeepAgents, or createOpenCode) with sandbox execution and credential brokering enabled, when the sandbox implementation lacks support for configuring request transformations.","commonSituations":"Developers enabling sandboxed agent runs with brokered credentials for API keys (e.g. provider keys injected as aisdkhc_ placeholders); teams running on a sandbox runtime that predates request-transformation support.","solutions":["Use a sandbox implementation that supports request transformations so credential brokering works.","Disable credential brokering explicitly if the insecure fallback is unacceptable, and pass credentials another way (e.g. per-tool auth configuration).","Accept the fallback after reviewing that forwarding credentials directly to the sandbox is acceptable in your threat model.","Suppress/handle the console.warn if the fallback is intentional in your environment."],"exampleFix":"// before\nconst agent = createClaudeCode({ sandbox: { credentialBrokering: true } });\n// after (sandbox lacks request-transform support)\nconst agent = createClaudeCode({ sandbox: { credentialBrokering: false } });","handlingStrategy":"validation","validationCode":"// verify sandbox supports request transformations before enabling brokering\nif (sandbox && !sandboxCapabilities.requestTransformations && credentialBrokering) {\n  // route credentials another way or disable brokering\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check sandbox capability docs before enabling credential brokering","Review security implications of credential forwarding fallback","Capture console.warn in dev CI to surface silent security degradations"],"tags":["security","credentials","sandbox","degradation"],"backgroundTag":"sandbox-credential-brokering-unsupported","analyzedSha":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}