Optionalstore: StateStoreStatic ReadonlyDEFAULT_Default stall threshold: 2 min (Issue #392: 1.5x CC's 90s default, configurable via CLAUDE_STREAM_IDLE_TIMEOUT_MS).
Static ReadonlyDEFAULT_Static ReadonlyDEFAULT_Default timeout for waiting CC to become ready (60s for cold starts).
Static ReadonlyDEFAULT_Max retries if CC doesn't become ready in time.
Load state from disk or the configured store (Issue #1937).
Save state to disk atomically (write to temp, then rename). #218: Uses a write queue to serialize concurrent saves and prevent corruption.
#357: Debounced save — skips immediate save for offset-only changes. Coalesces rapid successive reads into a single disk write.
Issue #3143: Wire ACP event store into transcript reader.
Wait for CC idle prompt, then send. Single attempt.
Optionalid?: stringOptionalname?: stringOptionalprd?: stringOptionalresumeSessionId?: stringOptionalclaudeCommand?: stringOptionalenv?: Record<string, string>OptionalstallThresholdMs?: numberOptionalpermissionStallMs?: numberOptionalpermissionMode?: stringOptionalautoApprove?: booleanOptionalparentId?: stringIssue #702: Parent session ID for sub-agent hierarchy
OptionalownerKeyId?: string | nullIssue #1429: API key ID that owns this session
OptionaltenantId?: stringIssue #1944: Tenant ID inherited from the creating API key.
OptionalinitialStatus?: UIStateIssue #3135: Override initial status when creating from ACP result.
Optionalmodel?: stringIssue #169 Phase 3: Update session status from a hook event. Returns the previous status for change detection. Issue #87: Also records hook latency timestamps.
OptionalhookTimestamp: numberFind an idle session by workDir (ACP mode: state-based lookup with acquisition). Atomically acquires the session under a mutex to prevent TOCTOU race (Issue #840/#880). Supports fault injection for testing (Issue #901).
Get health info (ACP stub — basic status without window checks).
Approve permission (ACP stub — handled by hooks).
Reject permission (ACP stub — handled by hooks).
Escape session (ACP stub).
Interrupt session (ACP stub — use JSON-RPC cancel).
Window alive check (ACP stub — always true).
Issue #88: Add an active subagent to a session.
Issue #88: Remove an active subagent from a session.
Issue #2518: Record a StopFailure hook event for circuit breaker tracking.
Issue #2518: Record a Stop (success) event — resets circuit breaker state.
Issue #2518: Check whether the circuit breaker should trip. Prunes stale timestamps outside the sliding window, then trips if the failure count meets or exceeds maxFailures. Once tripped, always returns true.
Issue #89 L25: Update the model field on a session from hook payload.
Issue #87: Get latency metrics for a session.
List all sessions.
Release a session claim after the reuse path completes (success or failure).
Record that a permission prompt was detected for this session.
Issue #284: Store a pending permission request and return a promise that resolves when the client approves/rejects via the API.
Aegis session ID
Timeout before auto-rejecting (default 10_000ms, matching CC's hook timeout)
OptionaltoolName: stringOptional tool name from the hook payload
Optionalprompt: stringOptional permission prompt text
Promise that resolves with the client's decision
Check if a session has a pending permission request.
Get info about a pending permission (for API responses).
Clean up any pending permission for a session (e.g. on session delete).
Issue #336: Store a pending AskUserQuestion and return a promise that resolves when the external client provides an answer via POST /answer.
Issue #336: Submit an answer to a pending question. Returns true if resolved.
Issue #336: Check if a session has a pending question.
Issue #336: Clean up any pending question for a session.
Read new messages from a session.
Issue #2539: Read new messages from an already-resolved SessionInfo.
Avoids the double lookup that readMessages(id) performs, eliminating
the TOCTOU race between ownership check and transcript read.
Read new messages for the monitor (separate offset from API reads).
Issue #35: Get a condensed summary of a session's transcript.
Paginated transcript read — does NOT advance the session's byteOffset.
OptionalroleFilter: "assistant" | "system" | "user"Cursor-based transcript read — stable under concurrent appends.
OptionalbeforeId: numberOptionalroleFilter: "assistant" | "system" | "user"Kill a session.
Coordinates session lifecycle, persistence, transcript discovery, and interactive approval/question flows for all managed Claude Code sessions.