# Delegated approval notice proof

Head: 079afe0549cbd3974e34c0603aedd0b06a991969
Base: 5307c233b1f0ae72b8894dd39d94019aaf9e7cb8

Before: four retained behavior cases fail with main production. Both cancellation cases also fail when only the orchestrator fix is removed. After: 64 tests pass in the control-read, completion-delivery and Stop suites. Targeted lint, server typecheck and formatting pass.

A standalone Node 24 process ran the actual orchestrator, event sink, SQLite projections and automatic DelegatedTaskRequestReactor.start subscription. It used in-memory state and a replay harness with external provider processes and the effect worker disabled. It did not call the reactor handler directly. Persisted message/run events mark the observed milestones; no sleeps or polling.

All five human approval kinds produced one notice each for active, idle and blocking-parent catch-up paths. Internal auth refresh and dynamic tool calls produced none. The child stayed running. Active-parent notice runs queued, resolution withdrew one, disposal cancelled the rest, and a stale dispatch was refused. Guidance links to the child and reserves approval for the human.

The process exited successfully. The harness emitted database-closed warnings from the orchestrator's terminal-event subscriber during teardown after the active scenario; inspected causes were ERR_INVALID_STATE after its SQLite scope closed. All assertions and persisted milestones completed before teardown. This is a runtime/service proof, not a full app, provider-account, UI or remote deployment acceptance run.

The review-discovered wait-timeout regression was reproduced in the existing deferral test (zero notices before the fix, one after). Runtime proof also applies the actual wake-policy upgrade to always before the launching run ends and receives all five notices. It models the timeout transition without waiting for a wall-clock timeout.

Observed output:

```json
[
  {
    "mode": "active",
    "approvalKinds": [
      "command",
      "file-read",
      "file-change",
      "mcp-elicitation",
      "permission"
    ],
    "noticeCount": 5,
    "initialStatuses": [
      "queued",
      "queued",
      "queued",
      "queued",
      "queued"
    ],
    "childStatus": "running",
    "resolutionAndDisposal": "all notice runs cancelled; late dispatch refused",
    "humanGuidance": "Delegated task node:delegated-task:human%3Adelegate%3Aapproval needs the user's approval. Ask the user to open [the child thread](t3-thread://v1/thread:delegated-task:human%3Adelegate%3Aapproval) and handle request approval:request:command there. Only the user can approve; do not answer this request with t3_pending_request_respond. If it is no longer pending, no action is needed."
  },
  {
    "mode": "blocking",
    "approvalKinds": [
      "command",
      "file-read",
      "file-change",
      "mcp-elicitation",
      "permission"
    ],
    "noticeCount": 5,
    "initialStatuses": [
      "starting",
      "queued",
      "queued",
      "queued",
      "queued"
    ],
    "childStatus": "running",
    "resolutionAndDisposal": "covered in active scenario",
    "humanGuidance": "Delegated task node:delegated-task:human%3Adelegate%3Aapproval needs the user's approval. Ask the user to open [the child thread](t3-thread://v1/thread:delegated-task:human%3Adelegate%3Aapproval) and handle request approval:request:mcp-elicitation there. Only the user can approve; do not answer this request with t3_pending_request_respond. If it is no longer pending, no action is needed."
  },
  {
    "mode": "idle",
    "approvalKinds": [
      "command",
      "file-read",
      "file-change",
      "mcp-elicitation",
      "permission"
    ],
    "noticeCount": 5,
    "initialStatuses": [
      "starting",
      "queued",
      "queued",
      "queued",
      "queued"
    ],
    "childStatus": "running",
    "resolutionAndDisposal": "covered in active scenario",
    "humanGuidance": "Delegated task node:delegated-task:human%3Adelegate%3Aapproval needs the user's approval. Ask the user to open [the child thread](t3-thread://v1/thread:delegated-task:human%3Adelegate%3Aapproval) and handle request approval:request:command there. Only the user can approve; do not answer this request with t3_pending_request_respond. If it is no longer pending, no action is needed."
  },
  {
    "mode": "blocking-timeout",
    "approvalKinds": [
      "command",
      "file-read",
      "file-change",
      "mcp-elicitation",
      "permission"
    ],
    "noticeCount": 5,
    "initialStatuses": [
      "starting",
      "queued",
      "queued",
      "queued",
      "queued"
    ],
    "childStatus": "running",
    "resolutionAndDisposal": "covered in active scenario",
    "humanGuidance": "Delegated task node:delegated-task:human%3Adelegate%3Aapproval needs the user's approval. Ask the user to open [the child thread](t3-thread://v1/thread:delegated-task:human%3Adelegate%3Aapproval) and handle request approval:request:mcp-elicitation there. Only the user can approve; do not answer this request with t3_pending_request_respond. If it is no longer pending, no action is needed."
  }
]
```

Not exercised: macOS, Windows, Electron, iOS, Android, real provider sessions, browser interaction or multi-host connections.
