{"record":{"id":"06141d96df22e41c","repo":"deepseek-ai/deepseek-harness","slug":"approval-for-escalating-to-mode-was-cancelled","errorCode":null,"errorMessage":"approval for escalating to \"${mode}\" was cancelled","messagePattern":"approval for escalating to \"(.+?)\" was cancelled","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/sandbox/sandbox/src/escalation.ts","lineNumber":185,"sourceCode":"  }\n  if (approval.agent === undefined) {\n    throw new Error(`sandbox escalation to \"${mode}\" requires approval, but the call has no agent to route it through`)\n  }\n  // Self-contained for the audit trail: approval/asked stores this reason,\n  // and the target mode is part of the grant's identity.\n  const outcome = await approval.approver.request({\n    agent: approval.agent,\n    toolName: approval.toolName,\n    callId: approval.callId,\n    reason: `escalate sandbox to ${mode}: ${justification}`,\n    ...approval.signal ? { signal: approval.signal } : {},\n  })\n  switch (outcome) {\n    // The schema enum already pinned `mode` to the closed target vocabulary;\n    // the check above proved it is strictly wider.\n    case 'allowed-once': return mode as SandboxMode\n    case 'rejected': throw new Error(`the user rejected escalating this ${subject} to \"${mode}\"`)\n    case 'cancelled': throw new Error(`approval for escalating to \"${mode}\" was cancelled`)\n    case 'unavailable': throw new Error(`sandbox escalation to \"${mode}\" requires approval, but no approval channel is available`)\n    default: return assertNever(outcome, 'EscalationOutcome')\n  }\n}\n","sourceCodeStart":167,"sourceCodeEnd":190,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/sandbox/sandbox/src/escalation.ts#L167-L190","documentation":"Error \"approval for escalating to \"${mode}\" was cancelled\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/sandbox/sandbox/src/escalation.ts:185 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-request the escalation approval; the previous approval prompt was cancelled."],"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"}