# PermissionResult

> What your code says back for each tool call. It is yes or no.

**Field:** Artificial Intelligence  
**Category:** Claude Agent SDK  
**Also known as:** PermissionResultAllow, PermissionResultDeny, Claude Agent SDK PermissionResult

## Think of it like

It is like a guard at a gate. The guard says go in, or says stop.

## Definition

PermissionResult is the answer your approval callback gives for each tool call. It says allow or deny. An allow can carry a changed input, so the tool runs with safer values. It can also add new permission rules. A deny carries a message that tells Claude why, and it can set interrupt to stop the whole run. Python has one class for each of the two answers.

## Example

An agent tries to delete a folder. The callback says no and gives a reason, so Claude picks another way.

## Example code

```typescript
return { behavior: "deny", message: "Deleting is not allowed here" };
```

Say no, and tell Claude why.

## Why it matters

The message on a deny steers Claude. A clear reason helps it pick a better next step.

## Common mistake

Returning deny with no useful message. Claude then guesses why and may try the same thing again.

## Three principles

- **Allow or deny.** The behavior field.
- **Allow can change input.** updatedInput.
- **Deny can stop the run.** interrupt: true.

## Related terms

- [canUseTool Callback](https://learn.benibix.com/term/ai/can-use-tool-callback)
- [permissionMode Option](https://learn.benibix.com/term/ai/permission-mode-option)
- [allowedTools Option](https://learn.benibix.com/term/ai/allowed-tools-option)
- [Human-in-the-Loop](https://learn.benibix.com/term/ai/human-in-the-loop)
- [interrupt() Method](https://learn.benibix.com/term/ai/interrupt-method)

![A tool call, Bash running rm -rf build, goes to your canUseTool code. Two arrows come out. Allow: the input may be changed first, then the tool runs. Deny: a message tells Claude why, and interrupt true ends the run.](https://learn.benibix.com/diagrams/ai9-permission-result.svg)

---

Source: https://learn.benibix.com/term/ai/permission-result
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-20
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
