# Fork a session

> Branches a new session from a point in this session's history: same context, different continuation.

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Fork a session"}
>
</Heading>

<MethodEndpoint
  method={"post"}
  path={"/api/v1/sessions/{session_id}/fork"}
  context={"endpoint"}
>
  
</MethodEndpoint>

Branches a new session from a point in this session's history: same context, different continuation.

The fork gets its own conversation whose messages **reference the same documents** as the parent rather than copying them, so there is one stored copy of the content and a retention purge erases it from both. Recorded tool results ride along on those messages and are **replayed** as model input on the fork's next turn — forking never re-invokes a tool, so exploring a "what if" cannot send an email or charge a card a second time. The consequence to accept is that a forked turn sees the tool data as it was, not as it is now.

The fork is created **inert**: `auto_generate` is false and no generation is triggered. Drive it with the normal message and generate endpoints. The fork has no actor — attach one only if the branch is meant to be driven by the same end user, since `single_session_per_actor` agents allow one open session per actor.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
>
  <Translate id="theme.openapi.request.title">Request</Translate>
</Heading>

<ParamsDetails
  {...require("./fork-session.ParamsDetails.json")}
>
  
</ParamsDetails>

<RequestSchema
  {...require("./fork-session.RequestSchema.json")}
>
  
</RequestSchema>

<StatusCodes
  {...require("./fork-session.StatusCodes.json")}
>
  
</StatusCodes>
