Skip to main content
Use durable execution when a tool waits longer than one request or process lifetime.

Suspend a tool

An unfinished plugin or task wait from a non-durable tool fails before Harnest persists the wait.

Resume sequence

1

Submit work

The tool submits with framework and invocation identity. Harnest supplies a replay-stable submission key to durable adapters.
2

Persist and arm

Harnest stores an opaque continuation, commits the framework checkpoint, then marks the wait resumable.
3

Complete externally

A task worker or Runtime Plugin validates and persists the result. Provider and checkpoint completion may arrive in either order.
4

Claim and resume

One replica atomically claims the wait, resumes the framework, and commits the transcript.

Framework behavior

Harnest lowers the function to an ADK long-running tool. Resume injects the exact persisted FunctionResponse; the original Python frame does not continue after the wait. Keep the wait at the tool’s return boundary.
durable=True persists logical execution, not local variables, threads, coroutines, or a Python process.

Run multiple replicas

All replicas must use the same application identity and shared stores: PostgresStore is the reference durable backend. MemoryStore cannot recover across processes. An opaque advanced-mode native checkpointer cannot provide Harnest’s portable continuation ownership.

Poll a response

A suspended JSON response returns status: in_progress. Poll with the same authenticated user and session:
Cross-user and cross-session lookups return the same not-found response as an unknown ID. Any healthy replica can serve the poll and reconstruct state from shared storage.