> ## Documentation Index
> Fetch the complete documentation index at: https://phidatainc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Team HITL: Rejecting a member agent tool call

> The team handles rejection of a tool call.

The team handles rejection of a tool call. After rejection, the team continues and the model responds acknowledging the rejection.

```python confirmation_rejected.py theme={null}
"""Team HITL: Rejecting a member agent tool call.

This example demonstrates how the team handles rejection of a tool
call. After rejection, the team continues and the model responds
acknowledging the rejection.
"""

from agno.agent import Agent
from agno.models.openai import OpenAIResponses
from agno.team.team import Team
from agno.tools import tool


# ---------------------------------------------------------------------------
# Tools
# ---------------------------------------------------------------------------
@tool(requires_confirmation=True)
def delete_user_account(username: str) -> str:
    """Permanently delete a user account and all associated data.

    Args:
        username (str): Username of the account to delete
    """
    return f"Account {username} has been permanently deleted"


# ---------------------------------------------------------------------------
# Create Members
# ---------------------------------------------------------------------------
admin_agent = Agent(
    name="Admin Agent",
    role="Handles account administration tasks",
    model=OpenAIResponses(id="gpt-5-mini"),
    tools=[delete_user_account],
)

# ---------------------------------------------------------------------------
# Create Team
# ---------------------------------------------------------------------------
team = Team(
    name="Admin Team",
    members=[admin_agent],
    model=OpenAIResponses(id="gpt-5-mini"),
)

# ---------------------------------------------------------------------------
# Run Team
# ---------------------------------------------------------------------------
if __name__ == "__main__":
    response = team.run("Delete the account for user 'jsmith'")

    if response.is_paused:
        print("Team paused - requires confirmation")
        for req in response.requirements:
            if req.needs_confirmation:
                print(f"  Tool: {req.tool_execution.tool_name}")
                print(f"  Args: {req.tool_execution.tool_args}")

                # Reject the dangerous operation
                req.reject(note="Account deletion requires manager approval first")

        response = team.continue_run(response)
        print(f"Result: {response.content}")
    else:
        print(f"Result: {response.content}")
```

## Run the Example

<Steps>
  <Snippet file="create-venv-step.mdx" />

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U agno openai
    ```
  </Step>

  <Step title="Export your OpenAI API key">
    <CodeGroup>
      ```bash Mac/Linux theme={null}
      export OPENAI_API_KEY="your_openai_api_key_here"
      ```

      ```bash Windows theme={null}
      $Env:OPENAI_API_KEY="your_openai_api_key_here"
      ```
    </CodeGroup>
  </Step>

  <Step title="Run the example">
    Save the code above as `confirmation_rejected.py`, then run:

    ```bash theme={null}
    python confirmation_rejected.py
    ```
  </Step>
</Steps>

Full source: [cookbook/03\_teams/20\_human\_in\_the\_loop/confirmation\_rejected.py](https://github.com/agno-agi/agno/blob/main/cookbook/03_teams/20_human_in_the_loop/confirmation_rejected.py)
