Skip to main content

Module pending_actions

Module pending_actions 

Source
Expand description

Pending actions tracking: tool calls that have been issued but not yet returned.

The agent harness issues tool calls to the LLM and then executes them. Between issue and completion, the actions are “pending.” Tracking pending actions enables:

  • Crash recovery: distinguish “tool never ran” from “tool response didn’t arrive.”
  • Timeout detection: identify hung tools and cancel them.
  • History validation: a pending action is not a “missing output” — it’s expected.

Following the “state as a first-class citizen” principle (Hitchhiker’s Guide to Agentic AI, Section 18.6.3), pending actions are part of the agent’s explicit state rather than an implicit property of the message history.

Structs§

PendingAction
A tool call that has been dispatched to the execution engine but not yet completed. Tracked by agent_call_id matching the LLM’s tool_call_id.
PendingActions
A list of pending actions with helpers for registration, resolution, and stale detection.

Enums§

ExpectedOutcome
Expected outcome category for a pending action.
PendingActionStatus
Lifecycle status of a pending action.