Skip to main content

Module runner_lifecycle

Module runner_lifecycle 

Source
Expand description

Runner lifecycle helpers for background agent execution.

Provides shared implementations for:

  • Runner reservation (check existing → create new with cancel token)
  • Runner finalization (map execution result to AgentStatus)
  • Status mapping

Functions§

finalize_runner
Update a runner’s terminal status and completion timestamp.
status_from_execution_result
Map an execution result to AgentStatus.
try_reserve_runner
Try to reserve a runner for the given session.