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

# Agent sessions

> ACP sessions link the phone to a coding agent process on the daemon.

An **agent session** is an ACP session relayed between the mobile app and an agent process on your machine.

## How it is created

* Task pipeline creates a **durable** session (one per task) with a worktree.
* Interactive chat can create sessions for ad-hoc work.
* Some pipeline steps use short **ephemeral** turns (for example summary).

## Session statuses

| Status         | Meaning                                              |
| -------------- | ---------------------------------------------------- |
| `pending`      | `session.create` in flight                           |
| `active`       | Agent process expected live                          |
| `reconnecting` | Host flap; backend will recreate                     |
| `disconnected` | Link lost                                            |
| `hibernated`   | Process stopped to free memory; next prompt respawns |
| `closed`       | Finished                                             |
| `error`        | Failed                                               |

Idle sessions hibernate after a quiet period (default 3 hours, `GPR_AGENT_IDLE_SECONDS`).

## Reconnect grace

If the daemon loses the backend socket briefly, in-flight agent processes can survive for a grace window (default 120 seconds, `GPR_SESSION_RECONNECT_GRACE_SECONDS`) before being killed.

## Permissions

Agents request permission over ACP (`session/request_permission`). The daemon auto-approves safe kinds by default and forwards mutating kinds to you. Details: [Permissions](/docs/security/permissions).

## Task linkage

Task-owned sessions carry the pipeline. Stopping a live run marks the task `interrupted` while keeping the checkpoint so you can continue later.
