The whole hunk
from line 213, old and new numbered
/
lines
from line 213
213213
214214When denying, provide a message explaining why. Claude sees this message and may adjust its approach.
215215
216<CodeGroup>
217 ```python Python theme={null}
218 from claude_agent_sdk.types import PermissionResultAllow, PermissionResultDeny
219
220 # Allow the tool to execute
221 return PermissionResultAllow(updated_input=input_data)
222
223 # Block the tool
224 return PermissionResultDeny(message="User rejected this action")
225 ```
226
227 ```typescript TypeScript theme={null}
228 // Allow the tool to execute
229 return { behavior: "allow", updatedInput: input };
230
231 // Block the tool
232 return { behavior: "deny", message: "User rejected this action" };
233 ```
234</CodeGroup>
235
236216Beyond allowing or denying, you can modify the tool's input or provide context that helps Claude adjust its approach:
237217
238218* **Approve**: let the tool execute as Claude requested