middleware.continuation_state

Private LangGraph state fields for continuation guard middleware.

Attributes

ContinuationMode

Classes

ContinuationGuardState

Private orchestration state for continuation control.

Module Contents

middleware.continuation_state.ContinuationMode
class middleware.continuation_state.ContinuationGuardState

Bases: langchain.agents.middleware.AgentState

Private orchestration state for continuation control.

continuation_mode: NotRequired[Annotated[ContinuationMode, langchain.agents.middleware.types.PrivateStateAttr]]
finalize_only_forbidden_tool_rounds: NotRequired[Annotated[int, langchain.agents.middleware.types.PrivateStateAttr]]

Count of consecutive finalize-only model turns that still emitted tool calls.

normal_mode_rejected_tool_signature: NotRequired[Annotated[str | None, langchain.agents.middleware.types.PrivateStateAttr]]

Exact signature of the repeated rejected tool call currently being tracked.

normal_mode_rejected_tool_name: NotRequired[Annotated[str | None, langchain.agents.middleware.types.PrivateStateAttr]]

Tool name paired with normal_mode_rejected_tool_signature for logging/debugging.

normal_mode_rejected_tool_rounds: NotRequired[Annotated[int, langchain.agents.middleware.types.PrivateStateAttr]]

Count of consecutive normal-mode retries for the same already-rejected tool call.

pending_tool_transcript_system_reminder: NotRequired[Annotated[str | None, _PENDING_TOOL_TRANSCRIPT_CHANNEL, langchain.agents.middleware.types.PrivateStateAttr]]

Tool-transcript repair nudge deferred from before_model for wrap_model_call.