Propose Run Scope
propose_scopePropose what this run will touch and block until the user ratifies it. Call ONCE at the start of a multi-step run, before doing work. The user sees the paths you intend to change, the areas you promise to leave alone, and your definition of done, and approves the whole thing in one tap. After that, editing a file outside the agreed scope stops being auto-approvable: it becomes a separate "wants to widen scope" question instead of a silent approval, so you are asked once about the boundary rather than repeatedly about each file. Use glob syntax ("src/", "/*.test.ts"). Shell commands are NOT scoped here, they stay governed by the permission policy. Scope lives for this session only and is never inherited by another run. Returns { correlationId, ratified, answered, value }; only ratified:true means the contract is enforced. If the first wait times out, poll its correlationId once; a late phone yes ratifies the stored proposal. If that poll is also pending, cancel it before asking in the current chat whether to continue without an enforced scope. If cancellation loses a race, honor the phone answer instead. Never describe a client-only agreement as ratification. SIDE EFFECT: sends a real push notification.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doneWhen | Yes | What "finished" means for this run, one or two lines. Carried for the human to judge against; never enforced automatically. | |
| agentName | No | Name of the agent asking, format "{Agent} - {project}". | |
| machineId | No | Stable machine id, so two machines never collapse into one session. | |
| sessionId | Yes | Your per-session id. Required: a scope with no session cannot be enforced, and must never leak into another run. | |
| timeoutMs | No | How long this call blocks, in milliseconds (max 55000). | |
| allowedPaths | No | Globs you intend to change, e.g. ["src/**", "docs/*.md"]. Omit or leave empty to propose no path restriction, which the user is told plainly. | |
| offLimitsPaths | No | Globs you promise not to touch, e.g. ["**/.env*", "infra/**"]. These win wherever they overlap allowedPaths. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Present only when the scope is not in force, saying what to do instead of proceeding. | |
| value | No | The raw answer behind ratified, "yes" or "no". | |
| status | No | The underlying scope-question state. | |
| answered | Yes | True when the user responded at all. Answered but not ratified means they declined, so ask what scope they want rather than proceeding. | |
| contract | Yes | The scope exactly as it was put to the user, echoed back so the agent and the human are holding the same contract. | |
| ratified | Yes | True only on an explicit yes. The contract is in force for this session only when this is true; anything else means proceed as if no scope was agreed. | |
| nextAction | No | Poll one live question once; otherwise ask in the current chat whether to continue without an enforced scope. | |
| correlationId | Yes | Id of the scope question. Pass it to wait_for_answer once when the first wait times out. | |
| handoffAction | No | Race-safe directive for updated clients. Takes precedence over nextAction. |