Repository navigation
[FEATURE]: make the 60m location inactivity TTL configurable (or opt-out) #55305
Description
Describe the enhancement you want to request
Expose the location inactivity TTL (LocationActivity.timeToLive, hardcoded to 60 minutes) as documented configuration, and allow disabling the idle eviction/interrupt.
The internal option already exists and is simply never plumbed from config: packages/core/src/location-activity.ts reads _t(options.timeToLive ?? "60 minutes"), but the service is wired without options (LocationActivity.node -> layer()). The sweep interval has the same shape (options.sweepInterval ?? "1 minute"). A Duration string ("24 hours", or "Infinity" to opt out) would therefore be the natural input format.
Why this matters (observed on 2.0.28). A turn parked on a user-facing form produces no durable session events, so the location deadline expires and the sweep interrupts it. Real case from an unattended orchestration run:
- Start a session in a project and let the agent call the
questiontool (owner decision) — no durable events follow while it waits. - Do not answer for more than an hour.
Observed at the 60-minute mark:
2026-10-13T23:25:24+05:00the agent parks onquestion;2026-10-13T19:25:57.418Zlevel=INFO message="location services evicted" directory=/home/<user>/<project>;- the pending tool call is failed with
{"status":"error","error":{"type":"aborted","message":"Tool execution interrupted"}}; - the session is persisted as
{"type":"idle","outcome":"interrupted"}— exactly 60m33s after the question was asked; - 1 second later the same location's MCP sessions are torn down (
WARN failed to terminate MCP session ... Timed out after 1000ms).
It is deterministic here: while idle, every registered location is evicted roughly every 61 minutes (30 evictions over ~14 h across 3 locations), so any run that legitimately waits longer than an hour for a human decision is destroyed. The only workaround today is patching the 60 minutes literal in the binary, which is unsupported and lost on upgrade.
Why this is separate from #51343. #51343 is "the sweep must not interrupt work that is still alive"; PRs #50499, #51583 and #53238 address that, and both #51583 and #53238 state explicitly that the timeout remains one hour and that no configurable timeout is added. This request is about being able to change or disable the TTL itself: unattended/orchestrated runs, and users who leave work parked overnight, need a much larger value or an opt-out.
Suggested surface (naming is up to you): a documented setting for the location idle TTL (and ideally the sweep interval), defaulting to today's values, with "Infinity"/0 to disable eviction.
Environment: opencode 2.0.28 (latest channel); WSL2 Ubuntu, Linux 6.18.33.2-microsoft-standard-WSL2 x86_64; TERM=xterm-256color; shell /bin/bash; plugin superpowers@git+https://github.com/obra/superpowers.git.
Activity
opencode-agent commentedon Oct 14, 2026
Thanks for the detailed request and the timestamps from your logs.
To restate it: you'd like the 60-minute location inactivity TTL in
LocationActivity, and ideally the 1-minute sweep interval, to be a documented setting. The defaults would stay as they are, and a value like"Infinity"/0would turn idle eviction off. That way runs that wait longer than an hour for a human answer aren't interrupted.You're right that
layer()already acceptstimeToLive/sweepIntervaland that config never reaches it. A plugin can't change this, because plugins can't set options on core services. The maintainers will consider it.Related issues and PRs:
AlexeyShirshov commentedon Oct 14, 2026
Related: same root cause as the other 60-minute TTL reports
Cross-linking so this isn't treated as unrelated — all of these are driven by the same
LocationActivitydeadline (packages/core/src/location-activity.ts,options.timeToLive ?? "60 minutes"), which is renewed only by durable session events:question) is interrupted when the deadline passes; pending questions are rejected. The closest to the motivation here.Difference in scope: those tickets ask for the eviction to stop killing live work (per-case exemptions plus regression tests). This one asks for the deadline itself to be configurable.
layer()already acceptstimeToLive/sweepInterval(packages/core/src/layer.ts), but config never reaches it — a value like"Infinity"/0would be the opt-out, defaults unchanged or the "waiting on a human for over an hour" case stays broken even after the exemptions land. Whoever fixes the exemption logic may still want this knob.yangyaofei commentedon Oct 15, 2026
Data point for the "multi-hour" side of this: a run waiting out a rate-limit quota reset can never complete under a hard 60-minute TTL.
On 2.0.28, a 429 carrying a 5-hour quota window (
resetstill ~3 hours away) schedules a retry; while it waits there are no durable session events, so the location is evicted 61 minutes later and the run is interrupted ({"type":"idle","outcome":"interrupted"},reason: "inactivity"), dropping the pending retry. Anything that legitimately waits longer than an hour — quota resets, long builds, human decisions — is destroyed, and the wait has to be restarted.+1 for a documented TTL setting (and ideally the sweep interval), with an opt-out. Concrete trace in #51343.
crag-h4k commentedon Oct 17, 2026
I'd also like a configurable inactivity timeout, including an option to disable eviction. I hit this on OpenCode 2.0.32 with OpenChamber: a question waiting for my answer was cancelled after about an hour. Being able to leave questions pending overnight would be useful.
dmchmk commentedon Oct 19, 2026
oh, pleeease, make this happen! Recently, I decided to try Qwen 3.8 27b Q4 on my RX6800 which obviously isn't capable to contain the whole model without offloading. And I'm getting 2tps - it's okay for me to test the model out, I can give it a task and walk away for the day.
But this model THINKS, and very often it thinks so much within a single turn that it faces the 1 hour limit and being dropped by the opencode. Please, make this configurable and allow us poor guys test new models:)