Skip to main content

session_runs

Function session_runs 

Source
pub fn session_runs(
    session: Option<&str>,
    since: Option<i64>,
    export: Export<'_>,
    query: Query<'_>,
) -> Vec<Run>
Expand description

One run per main session that started subagents, oldest first: session (a ses_… id) only, else every parent of a subagent session since since (1.x’s query). A subagent is a child session; the parent’s task tool call (1.x task, 2.x subagent) names it (metadata.sessionId/sessionID) with its description, agent and prompt, and holds its final text. Its export gives its cwd and work. opencode has no structured output: output stays None.