{"record":{"id":"57c8be2ad0572662","repo":"deepseek-ai/deepseek-harness","slug":"permission-custom-preset-is-reserved-for-the","errorCode":null,"errorMessage":"permission: \"${CUSTOM_PRESET}\" is reserved for the derived not-a-preset state and cannot name a table entry","messagePattern":"permission: \"(.+?)\" is reserved for the derived not-a-preset state and cannot name a table entry","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/interaction/permission-presets/src/index.ts","lineNumber":206,"sourceCode":"      'danger-full-access': {\n        sandbox: 'danger-full-access', approval: 'never',\n        name: 'danger-full-access', description: 'Full file access without approval prompts.',\n      },\n    }),\n    defaultPreset: z.string(),\n  })\n\n  static inject = ['shell', 'approval', 'sessions']\n\n  private readonly presets: Record<string, PresetSpec>\n  private defaultSettings: () => PermissionSettings\n\n  constructor(ctx: Context, config: Config) {\n    super(ctx, 'permissionPresets')\n    // The schema defaulted the table — the cast records that runtime fact.\n    this.presets = config.presets as Record<string, PresetSpec>\n    if (CUSTOM_PRESET in this.presets) {\n      throw new Error(`permission: \"${CUSTOM_PRESET}\" is reserved for the derived not-a-preset state and cannot name a table entry`)\n    }\n    if (ctx.shell.sandboxMode === undefined) {\n      throw new Error('permission: the mounted bash executor does not confine (no sandboxMode) — presets bundle a sandbox mode, so composing this plugin over an unconfined executor is a misconfiguration')\n    }\n    const inferredDefault = this.derive(EMPTY_KNOBS)\n    const defaultPreset = config.defaultPreset ?? inferredDefault\n    if (defaultPreset === CUSTOM_PRESET) {\n      throw new Error('permission: composed sandbox and approval defaults match no preset; configure defaultPreset explicitly')\n    }\n    this.resolve(defaultPreset)\n    const baseSettings: PermissionSettings = { defaultPreset }\n    this.defaultSettings = () => baseSettings\n    const presetChoices = this.names.map((name) => {\n      const choice = z.const(name)\n      const label = this.presets[name]?.name\n      return label === undefined ? choice : choice.description(label)\n    })\n    const settingsSchema: z<PermissionSettings> = z.object({","sourceCodeStart":188,"sourceCodeEnd":224,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/interaction/permission-presets/src/index.ts#L188-L224","documentation":"Error \"permission: \"${CUSTOM_PRESET}\" is reserved for the derived not-a-preset state and cannot name a table entry\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/interaction/permission-presets/src/index.ts:206 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"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"}