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

# Pause a session

> Halt a running session without losing state.

Pauses a running session. The agent stops processing but its state is fully preserved. You can [resume](/computer-use-agents/sessions/resume) it later to continue from exactly where it left off.

**Returns** `202 Accepted`. The pause command is delivered asynchronously.

***

## Path parameters

<ParamField path="id" type="string" required>
  The session ID.
</ParamField>

***

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://agp.eu.hcompany.ai/api/v2/sessions/$SESSION_ID/pause \
    -H "Authorization: Bearer $HAI_API_KEY"
  ```

  ```python Python theme={null}
  from hai_agents import Client

  client = Client()

  client.sessions.pause_session(session_id)
  ```

  ```typescript TypeScript theme={null}
  import { HaiAgentsClient } from "hai-agents";

  const client = new HaiAgentsClient();

  await client.sessions.pauseSession({ id: sessionId });
  ```
</CodeGroup>

***

## Errors

| Status | Cause                                                                                                                           |
| ------ | ------------------------------------------------------------------------------------------------------------------------------- |
| `404`  | Session not found, or you don't have access.                                                                                    |
| `409`  | The session is [`queued`](/computer-use-agents/observe-and-steer#queued-sessions) (nothing is running yet) or already finished. |
