Skip to content

The agent that grows with you

fix(unbroker): full autonomy waits on confirm_first actions

kshitijk4poorbe2e2bd0f3f3
diff --git a/optional-skills/security/unbroker/SKILL.md b/optional-skills/security/unbroker/SKILL.md
index ea8d998edb4..1a46b883e2e 100644
--- a/optional-skills/security/unbroker/SKILL.md
+++ b/optional-skills/security/unbroker/SKILL.md
@@ -40,8 +40,10 @@ digest at the end of the run (`$PDD tasks`). Between those:
- **Never ask the operator to choose configuration.** `$PDD setup --auto` detects capabilities and
picks the most autonomous valid config itself.
- **Never pause before individual submissions** when `autonomy=full` (the default): the consent
- recorded at intake is standing authorization for T0-T2 opt-outs. (`autonomy=assisted` restores
- per-submission confirmation for cautious operators - honor `confirm_first` flags in `next` output.)
+ recorded at intake is standing authorization for T0-T2 opt-outs. The one exception: an action
+ carrying `confirm_first: true` (always set on `dnc_register`, a registry signup the intake consent
+ does not cover) waits for the operator's yes in every mode. (`autonomy=assisted` sets
+ `confirm_first` on every submission for cautious operators.)
- **Never interrupt the run for human-only work.** Record it (`record ... human_task_queued
--reason "..."`) and keep going; it all surfaces once in the final digest.
- **Drive the whole run as a loop over `$PDD next <subject>`** - it returns the exact ordered actions
@@ -221,8 +223,8 @@ recording `found` and before any deletion.
crawl - see step 4), `poll_verification` (in-flight email confirmations), `verify_removal` (due
re-checks), `optout_web_form`/`optout_email_send` (Phase 2, parents-first with playbook steps),
`indirect_email_send`, and `stealth_rescan`. Human-only work never appears as an action - it
- accumulates in `q.human_digest`. In `autonomy=full`, execute actions without pausing; honor
- `confirm_first` in `assisted` mode.
+ accumulates in `q.human_digest`. In `autonomy=full`, execute actions without pausing, except any
+ action with `confirm_first: true`, which waits for the operator in every mode.
4. **Scanning (when `next` says so).** For `fanout_scan`: run `$PDD fanout <subject>` and **spawn one
`delegate_task` subagent per `batch`, in parallel, passing that batch's ready-made `brief`** - do
not scan all brokers yourself sequentially. For `scan_inline`: scan the few brokers yourself.
diff --git a/optional-skills/security/unbroker/references/methods.md b/optional-skills/security/unbroker/references/methods.md
index dbaa066bbd4..6aa5253efc4 100644
--- a/optional-skills/security/unbroker/references/methods.md
+++ b/optional-skills/security/unbroker/references/methods.md
@@ -8,7 +8,8 @@ the subject's before acting on any THIRD-PARTY / indirect record (see "Distingui
**Autonomy:** `pdd.py next <subject>` sequences all of this - it decides which method applies, orders
parents first, and routes human-only work to the digest. In `autonomy=full` (default), execute its
-actions without pausing per submission; the consent recorded at intake is the authorization. These
+actions without pausing per submission; the consent recorded at intake is the authorization (an
+action with `confirm_first: true`, such as `dnc_register`, still waits for the operator). These
playbooks are the HOW for each action type.
## Opt-out posture: blind opt-out is the default (not a fallback)
diff --git a/optional-skills/security/unbroker/scripts/autopilot.py b/optional-skills/security/unbroker/scripts/autopilot.py
index 58ed9eda239..340eaf8dbd8 100644
--- a/optional-skills/security/unbroker/scripts/autopilot.py
+++ b/optional-skills/security/unbroker/scripts/autopilot.py
@@ -11,7 +11,8 @@ concrete agent actions plus a human digest. The agent's whole run becomes a loop
Policy (cfg["autonomy"]):
full - intake consent is standing authorization; T0-T2 agent actions are
- executed without pausing. Humans appear only in the digest.
+ executed without pausing, except actions that set confirm_first=True
+ themselves (dnc_register). Humans appear only in the digest.
assisted - same queue, but every submission action carries confirm_first=True.
The queue is deterministic and side-effect free: it never mutates the ledger, it
@@ -519,6 +520,8 @@ def next_actions(dossier: dict, brokers_list: list[dict], cfg: dict,
"next_wake_at": next_wake,
"note": ("assisted mode: pause for operator confirmation on every action with confirm_first=true"
if confirm_first else
- "full autonomy: recorded intake consent authorizes these submissions; do not pause. "
+ "full autonomy: recorded intake consent authorizes these submissions; do not pause, "
+ "EXCEPT on an action with confirm_first=true (e.g. dnc_register), which waits for the "
+ "operator's yes. "
"Present human_digest ONCE at the end of the run, not per item."),
}
diff --git a/tests/skills/test_unbroker_skill.py b/tests/skills/test_unbroker_skill.py
index f9011e6c2e3..48e4f11ab50 100644
--- a/tests/skills/test_unbroker_skill.py
+++ b/tests/skills/test_unbroker_skill.py
@@ -884,6 +884,18 @@ def test_defunct_brokers_excluded_from_all_planning():
assert close and "not_found" in _json.dumps(close)
+def test_full_autonomy_note_honors_confirm_first():
+ # dnc_register always carries confirm_first; the full-mode note must not tell the agent
+ # to skip that pause.
+ with temp_env():
+ sid = _run(["intake", "--full-name", "Jane Q. Public", "--email", "[email protected]",
+ "--focus-phone", "+1-415-555-0137", "--consent"])["subject_id"]
+ q = autopilot.next_actions(dossier.load(sid), [], _auto_cfg(), {}, env={})
+ assert q["autonomy"] == "full"
+ assert [a["confirm_first"] for a in q["actions"] if a["type"] == "dnc_register"] == [True]
+ assert "EXCEPT on an action with confirm_first=true" in q["note"]
+
+
def test_ledger_not_found_close_out_only_for_defunct_brokers():
with temp_env():
sid = _run(["intake", "--full-name", "Jane Q. Public", "--email", "[email protected]",
diff --git a/website/docs/user-guide/skills/optional/security/security-unbroker.md b/website/docs/user-guide/skills/optional/security/security-unbroker.md
index 9bf94eef4c7..c9b2e50d0a8 100644
--- a/website/docs/user-guide/skills/optional/security/security-unbroker.md
+++ b/website/docs/user-guide/skills/optional/security/security-unbroker.md
@@ -54,8 +54,10 @@ digest at the end of the run (`$PDD tasks`). Between those:
- **Never ask the operator to choose configuration.** `$PDD setup --auto` detects capabilities and
picks the most autonomous valid config itself.
- **Never pause before individual submissions** when `autonomy=full` (the default): the consent
- recorded at intake is standing authorization for T0-T2 opt-outs. (`autonomy=assisted` restores
- per-submission confirmation for cautious operators - honor `confirm_first` flags in `next` output.)
+ recorded at intake is standing authorization for T0-T2 opt-outs. The one exception: an action
+ carrying `confirm_first: true` (always set on `dnc_register`, a registry signup the intake consent
+ does not cover) waits for the operator's yes in every mode. (`autonomy=assisted` sets
+ `confirm_first` on every submission for cautious operators.)
- **Never interrupt the run for human-only work.** Record it (`record ... human_task_queued
--reason "..."`) and keep going; it all surfaces once in the final digest.
- **Drive the whole run as a loop over `$PDD next <subject>`** - it returns the exact ordered actions
@@ -235,8 +237,8 @@ recording `found` and before any deletion.
crawl - see step 4), `poll_verification` (in-flight email confirmations), `verify_removal` (due
re-checks), `optout_web_form`/`optout_email_send` (Phase 2, parents-first with playbook steps),
`indirect_email_send`, and `stealth_rescan`. Human-only work never appears as an action - it
- accumulates in `q.human_digest`. In `autonomy=full`, execute actions without pausing; honor
- `confirm_first` in `assisted` mode.
+ accumulates in `q.human_digest`. In `autonomy=full`, execute actions without pausing, except any
+ action with `confirm_first: true`, which waits for the operator in every mode.
4. **Scanning (when `next` says so).** For `fanout_scan`: run `$PDD fanout <subject>` and **spawn one
`delegate_task` subagent per `batch`, in parallel, passing that batch's ready-made `brief`** - do
not scan all brokers yourself sequentially. For `scan_inline`: scan the few brokers yourself.