Skip to main content

Module agent_spawn

Module agent_spawn 

Source
Expand description

Core agent execution spawning logic.

Provides spawn_session_execution which handles the full lifecycle of a background agent run: spawn task → execute → finalize runner → persist session.

Structs§

SessionExecutionArgs
Arguments for spawning a background agent execution.
SessionExecutionOutcome
Outcome of an agent execution, handed to an optional SessionCompletionHook.

Functions§

log_base_system_prompt_snapshot
Log a snapshot of the base system prompt for debugging.
read_cached_session
Read a session out of the in-memory cache, cloning it out from under the brief sync read-lock. Returns None on a cache miss.
spawn_session_execution
Spawn a background agent execution task.
terminal_error_event_for_result
Map an execution result to a terminal error event.

Type Aliases§

SessionCache
Shared, per-session-locked session cache.
SessionCompletionHook
Optional post-execution hook for spawn_session_execution.