## Start with the operation

Nia\,&#32;the fictional desk operator\,&#32;receives two reports\:&#32;“the tool was blocked” and “the tool did not ask\.” Before changing a setting\,&#32;she asks what operation each report actually describes\.

That question prevents a common repair mistake\.&#32;A missing tool cannot be enabled by approving a call\.&#32;An explicit policy denial is not an unanswered question\.&#32;A successful approval cannot make an unwritable file writable\.&#32;Each failure belongs to a different boundary\.

### Five gates that must not be collapsed

The following is a diagnostic map\,&#32;not a promise that every host implements five checks in this exact order\.

| Gate | Question it answers | What passing it does not establish |
| --- | ---: | --- |
| Tool availability | Is this capability enabled and reachable through the current session’s actual tool surface\? | That any particular invocation is approved\. |
| Approval policy | Does the applicable declaration\,&#32;user policy\,&#32;and effective wrapper mode allow\,&#32;prompt\,&#32;or deny this call\? | A domain grant\,&#32;provider acknowledgement\,&#32;or OS privilege\. |
| Domain authority | Does the application permit this action on this object and revision\? | That host approval or filesystem access will succeed\. |
| Provider safety | Are applicable provider requirements satisfied\,&#32;including pending computer safety checks handled by the wrapper\? | That the operation is correct or allowed by the OS\. |
| OS or host authority | Can the actual process or client perform the requested effect at the actual destination\? | That the effect was wanted\,&#32;completed\,&#32;or correctly reported\. |

The distinction between availability and presentation is especially important\.&#32;A discoverable tool can be enabled without appearing as a top\-level schema\.&#32;The supplied&#32;`xd://`&#32;implementation can reach enabled mounted tools and enabled top\-level tools through its canonical map\.&#32;Conversely\,&#32;a name in old conversation text does not establish present availability\.

`ToolLoadMode`&#32;in&#32;`packages/agent/src/types.ts`&#32;describes presentation\.&#32;`resolveXdevTool()`&#32;in&#32;`packages/coding-agent/src/tools/xdev.ts`&#32;checks the enabled union before returning a tool\.&#32;Neither is a grant for an arbitrary operation\.&#32;The SDK’s restricted\-session options are also separate construction controls\;&#32;do not treat a familiar launch flag or a displayed name as a complete inventory of every runtime path\.

### Predict two different refusals

Inspect these inputs from Boundary Desk as data\:

~~~json
{
  "case": "boundary-no-ui",
  "approval": "exec",
  "args": { "action": "publish" },
  "mode": "always-ask",
  "ui": false
}
~~~

Now compare&#32;`boundary-deny-before-handler`\.&#32;Its declaration includes&#32;`policy: "deny"`\,&#32;its original action is&#32;`blocked`\,&#32;and its proposed handler replacement is&#32;`inspect`\.

**Prediction\:**&#32;will either case display a selection\?&#32;Will the replacement rescue the denied call\?

**Recorded answer\:**&#32;neither displayed a selection and neither reached the inert executor\.&#32;Their traces nevertheless differed\.&#32;`boundary-no-ui`&#32;recorded one&#32;`tool_call`\,&#32;then approval requested and approval resolved false with reason&#32;`no interactive UI available`\.&#32;`boundary-deny-before-handler`&#32;recorded no&#32;`tool_call`&#32;and no approval lifecycle pair\:&#32;the direct wrapper’s original\-input policy denial stopped before its handler could supply a replacement\.

Thus zero prompts does not mean automatic approval\.&#32;It can mean that the call was denied before prompting\,&#32;that prompting was required but unavailable\,&#32;or that policy admitted the call without a prompt\.&#32;The decision and execution evidence distinguish those cases\.

### Make a small decision record

For a blocked or unexpectedly unprompted call\,&#32;begin with the exact observed tool name\,&#32;call ID if available\,&#32;arguments\,&#32;path or device address\,&#32;and current session\/cwd scope\.&#32;Then identify the effective mode\,&#32;applicable policy key\,&#32;tool declaration\,&#32;and host UI capability\.&#32;Finally\,&#32;record whether the underlying operation executed and what effect was actually inspected\.

For this workbook\,&#32;those facts come from the supplied cases and recorded outcomes—not from a request to an agent to investigate your installation\.&#32;In later operational work\,&#32;keep complete sensitive arguments and diagnostics private\.

**Paper checkpoint\:**&#32;explain why&#32;`boundary-no-ui`&#32;is not an OS permission\-denied file write\.&#32;**Worked answer\:**&#32;it stops in&#32;`ExtensionToolWrapper.execute()`&#32;before the inert tool runs\;&#32;no file primitive is involved\.&#32;An OS denial belongs to a later operation\,&#32;such as the separate fallback case studied at Boundary Desk\.

**Failure boundary\:**&#32;the private scenario report uses a structural runner adapter and explicitly instrumented executors\.&#32;It is not a record of a provider choosing a tool\,&#32;a real person answering\,&#32;or every possible dispatch path\.

**Source anchors\:**&#32;`packages/agent/src/types.ts`&#32;—&#32;`AgentTool`\,&#32;`ToolLoadMode`\,&#32;`ToolApprovalDecision`\;&#32;`packages/coding-agent/src/sdk.ts`&#32;—&#32;`createAgentSessionScoped`\;&#32;`packages/coding-agent/src/tools/xdev.ts`&#32;—&#32;`resolveXdevTool`\;&#32;`packages/coding-agent/src/extensibility/extensions/wrapper.ts`&#32;—&#32;`ExtensionToolWrapper.execute`\.
