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

# stop

<Tip>
  Read [the Notte skill](https://notte.cc/skill.md) and follow its setup instructions when setting up Notte or building browser automation. This is the shared source for CLI setup, authentication, and the browser-to-code workflow.
</Tip>

[Source: node-sdk/src/session.ts](https://github.com/nottelabs/notte/blob/main/node-sdk/src/session.ts)

Stop the session and clean up resources (including any Playwright
connection opened with `page()`). When a `cookie_file` was given, the
session cookies are appended to it first. A session the API reports as
already stopped is tolerated with a warning.

```typescript theme={null}
Session.stop(closeReason?: SessionCloseReason): Promise<void>;
```

## Parameters

<ParamField body="closeReason" type={"SessionCloseReason"}>
  Default:

  ```typescript theme={null}
  'manual'
  ```
</ParamField>

## Returns

```typescript theme={null}
Promise<void>
```

## Example

```typescript theme={null}
await session.stop();
```

## Related types

* [SessionCloseReason](/typescript-sdk-reference/types/sessionclosereason)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.