Skip to content

ProgressEvent

ProgressEvent = { firstKeptOrdinal: number; modifiedFiles: string[]; readFiles: string[]; summary: string; tokensAfter: number; tokensBefore: number; type: "compaction"; } | { type: "thinking"; } | { delta: string; type: "thinking_delta"; } | { delta: string; type: "text_delta"; } | { arguments: Record<string, unknown>; name: string; type: "tool_start"; } | { delta: string; name: string; type: "tool_delta"; } | { arguments: Record<string, unknown>; name: string; type: "tool_end"; } | { type: "responding"; }

Defined in: src/session.ts:101

Progress events emitted during Session.ask() via the onProgress callback.

Event sequence: 0. “compaction” - Context compacted (if needed, before LLM call)

  1. “thinking” - Emitted at the start of each iteration
  2. “thinking_delta” - Model’s thinking/reasoning (streaming)
  3. “text_delta” - Response text (streaming)
  4. “tool_start” - Tool call initiated
  5. “tool_delta” - Tool call arguments (streaming)
  6. “tool_end” - Tool call complete with final arguments
  7. “responding” - Final response ready (no more tool calls)