2.3.0b1 (2026-10-15)
Features Added
- Added
AgentServerHost.readiness_handlerfor replacing the default
GET /readinessresponse with application-specific readiness logic. When no
handler is registered, the existing healthy response remains unchanged. - Added the private
POST /_agent/before-snapshotand
POST /_agent/after-restorelifecycle endpoints, with equivalent
POST /_before_snapshotandPOST /_after_restorealiases, for safely
capturing and restoring hosted agent processes. Applications can register
before_snapshot_handlerandafter_restore_handlercallbacks; lifecycle
calls are serialized and idempotent, and restored session environment
overrides are applied before the after-restore callback runs. Protocol
subclasses can extend the lifecycle through protected hooks without
bypassing the host's required hydration and rollback behavior. Later
materializations reset omitted overrides to their captured values and expose
the restored session through the ambient request context during callbacks.
Environment-backedAgentConfigvalues are refreshed in place before
callbacks run, andAgentSessionContextis marked experimental.
Bugs Fixed
- Preserve an observed final terminal marker before recovery-time TTL
compaction, keeping closed replay logs closed across subsequent restarts. - Retain replay backing ownership through deletion: keep POSIX inode locks
until unlink and Windows sidecar locks until log removal. Acquire Windows
ownership before opening the log, reject stale or replaced locked descriptors,
and retry cleanup without unlinking a successor's backing file. - Release owned replay-file and writer-lock resources on every rehydration
failure, including callback errors and cancellation. Surface cleanup errors
with their original failure context and retain exact registry cleanup owners
when resource release must be retried. - Fail closed after compaction replaces the log but cannot establish a usable
writer. Retire stale handles, reject further writes, wake subscribers with an
explicit error, and reacquire ownership before deleting a failed replacement.
Keep the original writer usable when preparation fails before replacement. - Open existing replay logs in non-creating mode during cold lookup and
compaction reopen, preventing concurrent removal from recreating an empty
log. Preserve explicit creation and propagate backing-lock acquisition errors. - Delete cold file-backed replay logs without deserializing their events, so
malformed logs remain removable after restart. Preserve locking and retryable
cleanup when file access, lock acquisition, or removal fails. - Apply explicit task-list limits to the total returned records for both hosted
and local providers, clamped to 100. Keep omitted orNonelimits as complete
enumeration so recovery and response-ownership scans include every page. - Reclaim per-ID stream lifecycle locks after their last holder or waiter exits,
including cancellation, without splitting concurrent lookup, creation, or deletion. - Enumerate every matching local durable task when no listing limit is
requested, matching hosted task enumeration. Reject missing or repeated
hosted continuation cursors instead of returning an incomplete task list. - Restore existing file-backed replay logs during stream lookup and deletion
after restart without creating absent logs. Serialize lookup, creation, and
deletion for the same stream ID within the registry. - Propagate replay-file deletion failures without installing a successful
deletion tombstone, allowing cleanup to be retried. - Make Windows replay lock-file removal failures retryable without closing
an already-released file descriptor or reporting successful deletion.
Other Changes
- Removed the experimental marker (docstring note and one-time runtime warning)
from the resilient task public APIs (TaskContext,TaskRun,@task,
@multi_turn_task,set_resilient_tasks_enabled, task exceptions, and
retry policy). - Changed the default SSE keep-alive interval to 15 seconds. Set
SSE_KEEPALIVE_INTERVAL=0to disable keep-alive comments.