You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 206b49e
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: dotnet/README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1215,6 +1215,8 @@ No extra dependencies — uses built-in `System.Diagnostics.Activity`.
1215
1215
1216
1216
An `OnPermissionRequest` handler is optional when you create or resume a session. When provided, it is called before the agent executes each tool (file writes, shell commands, custom tools, etc.) and returns a decision. When omitted, permission requests are emitted as events and left pending for the consumer to resolve with the pending permission RPC.
1217
1217
1218
+
Callbacks receive optional derived prompt context as `invocation.PromptRequest`, matching `PermissionRequestedData.PromptRequest`. The raw request's `ManagedApprovalRequired` remains managed-policy provenance and enforces one-shot restrictions. Only derived `commands`, `read`, `write`, `url`, and `workflow` prompts can clear the human requirement after Assisted approval; for missing or other prompt kinds, keep the raw marker authoritative.
1219
+
1218
1220
### Approve All (simplest)
1219
1221
1220
1222
Use the built-in `PermissionHandler.ApproveAll` helper to approve ordinary permission requests automatically:
0 commit comments