deepseek-ai/deepseek-harness · error · Error

permission: composed sandbox and approval defaults match no

Error message

permission: composed sandbox and approval defaults match no preset; configure defaultPreset explicitly

What it means

Error "permission: composed sandbox and approval defaults match no preset; configure defaultPreset explicitly" thrown in deepseek-ai/deepseek-harness.

Source

Thrown at packages/interaction/permission-presets/src/index.ts:214

  static inject = ['shell', 'approval', 'sessions']

  private readonly presets: Record<string, PresetSpec>
  private defaultSettings: () => PermissionSettings

  constructor(ctx: Context, config: Config) {
    super(ctx, 'permissionPresets')
    // The schema defaulted the table — the cast records that runtime fact.
    this.presets = config.presets as Record<string, PresetSpec>
    if (CUSTOM_PRESET in this.presets) {
      throw new Error(`permission: "${CUSTOM_PRESET}" is reserved for the derived not-a-preset state and cannot name a table entry`)
    }
    if (ctx.shell.sandboxMode === undefined) {
      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')
    }
    const inferredDefault = this.derive(EMPTY_KNOBS)
    const defaultPreset = config.defaultPreset ?? inferredDefault
    if (defaultPreset === CUSTOM_PRESET) {
      throw new Error('permission: composed sandbox and approval defaults match no preset; configure defaultPreset explicitly')
    }
    this.resolve(defaultPreset)
    const baseSettings: PermissionSettings = { defaultPreset }
    this.defaultSettings = () => baseSettings
    const presetChoices = this.names.map((name) => {
      const choice = z.const(name)
      const label = this.presets[name]?.name
      return label === undefined ? choice : choice.description(label)
    })
    const settingsSchema: z<PermissionSettings> = z.object({
      defaultPreset: z.union(presetChoices).required(),
    })
    installSettingsSection(ctx, PERMISSION_SETTINGS_NAMESPACE, settingsSchema, baseSettings, {
      setSource: (current) => {
        this.defaultSettings = current
      },
      // The source thunk reads the latest scope snapshot at session creation;
      // no process-level registration needs replacement on change.

View on GitHub (pinned to b150a551b8)

When it happens

Trigger: Thrown at packages/interaction/permission-presets/src/index.ts:214 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24). Data as JSON: /api/errors/2455a1c404bc4c08. Report an issue: GitHub.