Skip to main content

Module session

Module session 

Source
Expand description

Session metadata — the SessionInfo struct and its satellites.

Structs§

ForkedFrom
Where a forked session came from — the parent id, the parent’s name at fork time (a snapshot; the parent may be renamed or gone), and the branch point (conversation rounds carried over).
RotationInfo
Rotation telemetry — how many times the backing Claude Code session has been rolled over to avoid context compaction.
SessionInfo
Top-level session metadata — broadcast on attach, list, and every session.info_update.
SessionUsage
Cumulative usage totals for a session. Aggregated from each SDK result event.
SessionWorktree
A git worktree backing a session’s workdir. created_by_codeoid marks a worktree codeoid created for fork isolation (removed on destroy) versus one the user bound (never touched).
Subagent
Active sub-agent for the identity chain display.
TurnUsage
Per-turn usage record — one entry per SDK result event.

Enums§

SessionMode
Execution mode — controls tool approval and autonomous budgeting.
SessionStatus
Lifecycle status of a session.