# software-agent-sdk · Durable execution

> Levels are per column and must not be summed, averaged or ranked. A level states which written criterion the runtime's source meets. It is not a measure of quality or task success. Higher is not always preferable.

Source: "Agent runtime comparison: ten open-source agent runtimes, source review", study of 2026-11-28. Mark notation: `3` is the level in the default deployment; `1→4 [opt: …]` is level 1 by default and level 4 in the named configuration; `s` source-verified, `d` documented or test only. Service dependencies are classes (E embedded, O on demand, R resident service, X external server required), not levels.

- Runtime: [software-agent-sdk](https://ai-agents-review.com/runtime/software-agent-sdk.md)
- Column: [Durable execution](https://ai-agents-review.com/column/durable-execution.md) (Product integration)
- Mark: 0→3 [alt: agent-server] s
- Default deployment: 0
- Best supported configuration: 3 (alt: agent-server)
- Page: https://ai-agents-review.com/cell/software-agent-sdk/durable-execution

## Rationale

Local SDK persists nothing without `persistence_dir`. The server survives disconnect and marks stale RUNNING as ERROR, with no auto re-run

## Rubric criteria for this column

- 0: State in memory only; a restart loses sessions
- 1: Sessions persist, but an in-flight turn is lost on restart **and** concurrent requests on one session are not serialized (dropped or racing)
- 2: Sessions persist and concurrent input is serialized (queue, steer or reject), but an interrupted turn is lost or must be resent by hand
- 3: Level 2, plus an interrupted turn is detected after restart and either closed out with a recorded error **or** resumed
- 4: Level 3, plus turns survive client disconnect **and** automatic resume or replay with an explicit idempotency rule (request ids, replay-safe declarations, at-least-once documented)

## Review finding

Local SDK: `run()` is synchronous in the caller's thread; nothing persists without `persistence_dir`. Server: runs in background tasks that survive disconnect; second run rejected. On reload, stale RUNNING becomes ERROR, no auto re-run. File lease (45 s TTL) per conversation; 5 LLM retries. [I128][I129][I130][I131][I132][I133][I134]

## Evidence cited by the mark

- [I128] software-agent-sdk — https://github.com/OpenHands/software-agent-sdk/blob/cf8158bc25f5552c50ad131a5f0ce2dbc297789b/openhands-sdk/openhands/sdk/conversation/impl/local_conversation.py#L3517-L3578 — `pause()` between steps; sync `run()` interrupt falls back to pause — [S]
- [I129] software-agent-sdk — https://github.com/OpenHands/software-agent-sdk/blob/cf8158bc25f5552c50ad131a5f0ce2dbc297789b/openhands-agent-server/openhands/agent_server/event_service.py#L1684-L1790 — server background run; `ConversationAlreadyRunning` guard — [S]
- [I130] software-agent-sdk — https://github.com/OpenHands/software-agent-sdk/blob/cf8158bc25f5552c50ad131a5f0ce2dbc297789b/openhands-agent-server/openhands/agent_server/event_service.py#L1580-L1633 — stale RUNNING → ERROR with `recovery_reason="server_restart"` — [S]

## Evidence also cited by the review finding

- [I131] software-agent-sdk — https://github.com/OpenHands/software-agent-sdk/blob/cf8158bc25f5552c50ad131a5f0ce2dbc297789b/openhands-agent-server/openhands/agent_server/conversation_lease.py#L19-L25 — `owner_lease.json`, TTL 45 s — [S]
- [I132] software-agent-sdk — https://github.com/OpenHands/software-agent-sdk/blob/cf8158bc25f5552c50ad131a5f0ce2dbc297789b/openhands-agent-server/openhands/agent_server/event_router.py#L275-L290 — send during active gateway run → 409 unsaved; 429 after save — [S]
- [I133] software-agent-sdk — https://github.com/OpenHands/software-agent-sdk/blob/cf8158bc25f5552c50ad131a5f0ce2dbc297789b/openhands-sdk/openhands/sdk/conversation/impl/remote_conversation.py#L1260-L1300 — WebSocket reconnect replays missed events via REST reconcile — [S]
- [I134] software-agent-sdk — https://github.com/OpenHands/software-agent-sdk/blob/cf8158bc25f5552c50ad131a5f0ce2dbc297789b/openhands-sdk/openhands/sdk/llm/llm.py#L386-L399 — `num_retries=5`, exponential waits — [S]

## Grading record

- Grader A (default / best): 0 / 3
- Grader B (default / best): 0 / 3
