mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
A review finding claimed plan mode under the registry's 'both' presentation leaves non-allowlisted native schemas on the wire. The claim misreads the filter predicate — 'keep visible plus run_code' IS 'drop everything else' — and the SDK re-render shares the same visible() predicate, which is precisely the remedy the finding requests. This test refutes it empirically on unchanged code (first run green) and stays as the regression pin: plan + both = [exit_plan_mode, read, run_code] on the wire, read documented and write absent in the SDK.
mode/ — session-mode policy family
Session modes: named, logged, per-agent policy states, with plan mode as the first shipped definition. A single product package — there is no interface/implementation seam here, because a mode's variable parts are config values (allowlist, section text), not swappable implementations.
| Package | Role | ctx key |
|---|---|---|
mode/ |
mode/set vocabulary + fold, the ctx.modes service (list/get/set with the turn-boundary flush), the soft layer (assemble filter + mode:policy section), the hard layer (tools/pre-execute deny-by-default gate), and the model-facing exit_plan_mode review tool |
ctx.modes |
The mode in force is a pure function of the session log (SessionEventMap['mode/set'], last one wins), so resume and fork restore it with no extra machinery; the default mode is the absence of policy, keeping the plugin invisible until a mode is set. UIs read flips off session/event: the stdio app exposes /mode, the ACP bridge maps the vocabulary to the session-mode picker. RFC: plan mode.