opencode's hardcoded 60-minute idle TTL kills unattended agent runs waiting on humans

AlexeyShirshov · ghdev · 2026-10-14

anomalyco/opencode issue #55305 asks to expose the location inactivity TTL (LocationActivity.timeToLive, hardcoded to 60 minutes) as documented config, with an opt-out for idle eviction. The internal option already exists but is never plumbed: location-activity.ts reads t(options.timeToLive ?? "60 minutes"), yet the service is wired without options; sweep interval has the same shape, and Duration strings like "24 hours" or "Infinity" would be natural inputs.

The author reproduced the failure deterministically on 2.0.28: in an unattended orchestration run, an agent parked on the question tool produced no durable events while waiting, so at exactly 60m33s the location was swept, the pending tool call failed with "Tool execution interrupted", the session was persisted as idle/interrupted, and MCP sessions for that location were torn down a second later (terminate timed out after 1000ms). Roughly 30 evictions hit 3 locations over 14 hours, destroying any run legitimately waiting over an hour. The only workaround is patching the literal in the binary, which is lost on upgrade.

Original post →

More from coding & agent

coding & agent channel →