Skip to main content

Module execute

Module execute 

Source
Expand description

Execute use case: prepare a session for agent execution.

Functions§

billable_user_turn_count
Count the number of billable user turns in a session — i.e. user messages that were actually initiated by the human, excluding runtime-injected resume messages from child completion, retry, or conclusion-with-options.
consume_pending_conclusion_with_options_resume
evaluate_client_sync
has_pending_conclusion_with_options_resume
has_pending_retry_resume
has_pending_user_message
Whether the session has resumable user work (pending tool response, retry, or last message is from user).
is_billable_user_turn
Returns true when the message represents a billable end-user turn.
is_system_resume_message
Returns true if the message was synthesized by the runtime to resume a suspended root session (child completion, retry, conclusion-with-options).
prepare_execute
Prepare an execute: load session, resolve model/reasoning, validate, update metadata, return outcome.