{"record":{"id":"6a693f37030ea838","repo":"deepseek-ai/deepseek-harness","slug":"invalid-escalation-sandbox-permissions-requires-a","errorCode":null,"errorMessage":"invalid escalation: sandbox_permissions requires a justification","messagePattern":"invalid escalation: sandbox_permissions requires a justification","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/sandbox/sandbox/src/escalation.ts","lineNumber":53,"sourceCode":" * escalate TO (`read-only` is the floor; nothing escalates to it). Advertised\n * whenever the mounted capability confines: cutting the enum down to the modes\n * wider than the composition's DEFAULT would strand a session whose effective\n * mode sits below it (a `danger-full-access` default would advertise nothing\n * while a narrower-switched session stays confined with no lever).\n */\nexport const ESCALATION_TARGETS: readonly SandboxMode[] = ['workspace-write', 'danger-full-access']\n\n/**\n * Validate the escalation argument pairing a tool schema cannot express:\n * `sandbox_permissions` and `justification` travel together — an approval\n * prompt without a reason, or a reason driving nothing, is a malformed ask —\n * and the justification must be a non-empty sentence.\n * @param sandboxPermissions - the raw `sandbox_permissions` argument, if given.\n * @param justification - the raw `justification` argument, if given.\n */\nexport function validateEscalationArgs(sandboxPermissions: string | undefined, justification: string | undefined): void {\n  if (sandboxPermissions !== undefined && justification === undefined) {\n    throw new Error('invalid escalation: sandbox_permissions requires a justification')\n  }\n  if (justification !== undefined && sandboxPermissions === undefined) {\n    throw new Error('invalid escalation: justification is only valid together with sandbox_permissions')\n  }\n  if (justification !== undefined && justification.trim().length === 0) {\n    throw new Error('invalid justification: expected a non-empty sentence')\n  }\n}\n\n/**\n * The model-facing denial marker — the one vocabulary both enforcing families\n * teach and report, so the model recognizes a policy denial identically\n * whether the kernel refused a bash file effect or the filesystem provider's\n * fence refused a mutation.\n * @param mode - the mode the denied call ran under.\n * @returns the marker line, exactly as the model sees it.\n */\nexport function sandboxDenialMarker(mode: SandboxMode): string {","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/sandbox/sandbox/src/escalation.ts#L35-L71","documentation":"Error \"invalid escalation: sandbox_permissions requires a justification\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/sandbox/sandbox/src/escalation.ts:53 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include a non-empty justification string with the sandbox_permissions request."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}