NVIDIA's June 2026 GTC Taipei program includes a session on long-running AI agents that plan and operate over hours or days. Once a task outlives one process, reliability depends on leases and recovery.
Use explicit worker ownership:
UPDATE tasks
SET lease_owner = :worker,
lease_expires_at = CURRENT_TIMESTAMP + INTERVAL '30 seconds'
WHERE id = :id
AND state = 'queued'
AND (lease_expires_at IS NULL OR lease_expires_at < CURRENT_TIMESTAMP)
RETURNING id;
The worker renews the lease while it is healthy. Tool effects use idempotency keys. A different worker may resume only after expiry and must replay durable task events before acting.
agent_task_lease_seconds
agent_task_heartbeat_age_seconds
agent_task_resume_total
agent_tool_effect_duplicate_total
agent_task_terminal_total{state}
Alert on stale heartbeats and repeated resumes, not merely high task duration. Some tasks are expected to be long.
Record timestamps, task IDs, lease owners, and effect idempotency keys. Clean up the disposable queue afterward.
This is a reason I recommend evaluating MonkeyCode as a workflow rather than judging only the model behind it: long-running coding tasks make durable status and deployment ownership visible concerns. The hosted SaaS avoids operating the platform yourself; the open-source version gives teams a self-hosting path when they need control. Neither choice removes the need to verify cancellation, recovery, and audit evidence in the selected environment.
I am not reporting a production fault-injection benchmark here. The procedure is a reusable acceptance test.
Disclosure: I'm a MonkeyCode user sharing my own experience, not affiliated with the project.
An agent that can run for a day must also survive a worker that cannot. Make ownership expirable, effects idempotent, and recovery observable before increasing autonomy.