Make the Free Server a Lease-Bound Executor Before Your Agent Double-Fires
说明与用途
该模式通过在外部存储中持久化租约和状态,确保即使在免费服务器上进程崩溃,外部副作用也只执行一次。
问题
AI agents on disposable free-tier servers lose in-memory state on reboot, causing duplicate side-effects when a model call is retried after a crash.
结果
By persisting lease and side-effect status outside the disposable server, the pattern guarantees at-most-once execution of side-effects, eliminating duplicates caused by process restarts.
工作流
- Place task in durable queue via orchestrator
- Free server acquires lease in external storage
- Write side-effect record as pending
- Call model endpoint (retryable)
- Apply external side-effect (e.g., create GitHub issue)
- Mark side-effect record as done
- If server dies, lease expires and orchestrator re-enqueues task
- New executor checks side-effect status: skip if done, finish if pending, start from step 3 if absent
证据
The executor writes a side-effect record with status pending to the same external store.
If the server dies after applying effect, before marking done, the new executor sees pending and re-applies the effect.
- 记录日期: 2026-09-10T03:02:10.687Z