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

# Stop Scope • AI Agent SDK

> StopScope: How much of a session's work a stop owns.

# StopScope

> Defined in the [**protocols**](../modules/protocols) module.

<Badge color="blue">AI Agent</Badge>

How much of a session's work a stop owns.

`TURN` cancels only the running turn (today's behaviour; default for
backward compatibility). `SESSION` cancels the running turn *and* drains
the session's queued-but-unstarted ingress so no backlogged message is
executed after the stop.

## Methods

<CardGroup cols={2}>
  <Card title="coerce()" icon="function" href="../functions/StopScope-coerce">
    Best-effort parse of an external `scope` value.
  </Card>
</CardGroup>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/protocols.py#L7308">
  `praisonaiagents/gateway/protocols.py` at line 7308
</Card>
