Skip to main content

Module session

Module session 

Source
Expand description

Session files for production pause/resume.

A SessionFile captures enough agent state to resume a run that terminated abnormally (budget exceeded, stuck, transcript limit). It stores the goal, model, provider, a hash of the tool registry, the steps consumed so far, and the full transcript.

Sessions are written alongside transcripts when --session-out is set and the finish reason is non-success. They live under <workspace>/.recursive/sessions/ by convention.

Structs§

SessionFile
A saved session that can be resumed.

Functions§

default_session_path
Default session output path for a given workspace. Returns <workspace>/.recursive/sessions/<timestamp>-<goal-prefix>.json.
list_sessions
List all session files in a workspace’s session directory.