LAYER 04 · Understand safety and durability

Approval, policy, and permission presets

Separate one-shot human decisions, session policy, and sandbox mode into orthogonal controls

18 min3 source anchorsupstream@47f9438
preset = sandbox knob + approval knob
The question this chapter resolves

Why does danger-full-access plus never-ask still not mean every tool can execute?

Build intuition

Access zones, whether to call an administrator, and prohibited-item rules are separate systems. A permission preset bundles the first two for convenience; it cannot erase hard prohibitions.

MECHANISM

Mechanism

ctx.approval returns allowed-once, rejected, cancelled, or unavailable for one exact action. Every outcome except allowed-once fails closed. ApprovalPolicy is ask or never.

PermissionPreset writes sandbox/mode and approval/policy through their authoritative setters. current() derives from actual folded knobs and reports custom when no preset matches.

Step 1 of 5

Select preset

Record permission/preset user intent.

INVARIANTS

What extensions must preserve

  • unavailable must deny
  • allowed-once authorizes only the current operation
  • Presets do not enforce; they compose authoritative knobs
FAILURE MODES

The tempting wrong turns

  • ×Interpreting never as auto-allow
  • ×Duplicating tool arguments into an approval prompt and letting them drift
  • ×Persisting custom as a selectable preset
VERIFY IN SOURCE

Do not trust the conclusion—verify it

These anchors are pinned to official deepseek-harness@47f9438; account for later breaking changes when reading current upstream.

KNOWLEDGE CHECK

Pause for ten seconds before revealing

Why does an answerer failure not retry or default-allow?

Why the next chapter follows

Approval decides whether to proceed; sandbox and capability seams decide where and what the action may affect.

Learn DeepSeek Harness

An independent learning project. Explanations derive from source; upstream remains authoritative.