Skip to content

symfonic.agent.facade_continuation

facade_continuation

Continuation and child-delegation invocation helpers for :class:Agent.

AgentContinuationMixin

Keep trusted recovery and child lineage out of the ordinary facade.

continue_recovered async

continue_recovered(continuation: RecoveredContinuation) -> AgentResult[Any]

Run one host-recovered turn with a new, kernel-owned run identity.

RecoveredContinuation is trusted composition metadata after the host has authenticated and claimed its pause token; this entry accepts no scope or caller-selected new run ID.

Source code in src/symfonic/agent/facade_continuation.py
async def continue_recovered(
    self, continuation: RecoveredContinuation
) -> AgentResult[Any]:
    """Run one host-recovered turn with a new, kernel-owned run identity.

    ``RecoveredContinuation`` is trusted composition metadata after the
    host has authenticated and claimed its pause token; this entry accepts
    no scope or caller-selected new run ID.
    """
    if not isinstance(continuation, RecoveredContinuation):
        raise TypeError("continue_recovered needs a RecoveredContinuation")
    request = turn_for(
        continuation.prompt, (), continuation.history, None,
        session_id=continuation.session_id,
        root_run_id=continuation.root_run_id,
        parent_run_id=continuation.paused_run_id,
    )
    return await dispatch(self._kernel, self._prepare, request, None)