Skip to content

session: location inactivity interrupt aborts pending question with "Tool execution interrupted" #54404

Description

@baldassarreFe

Description

A session parked on a pending question tool call is interrupted by the location inactivity sweeper after ~60 minutes. The question becomes unanswerable and the turn dies:

Asked 1 question
Tool execution interrupted

The agent does not continue the conversation after the interrupt.

Verified in source (dev @ 7b3d4ce):

  • question blocks on forms.ask(...) with no deadline (packages/core/src/tool/plugin/question.ts), and pending forms are kept alive indefinitely (packages/core/src/form.ts: pending-form cache TTL is Duration.infinity).
  • While the turn waits for an answer, no durable session events are published, so nothing refreshes the location TTL in packages/core/src/location-activity.ts (options.timeToLive ?? "60 minutes").
  • When the TTL expires, the sweeper interrupts all active executions in the location with reason: "inactivity", and packages/core/src/session/runner/step.ts fails every unsettled tool call with TOOLS_INTERRUPTED ("Tool execution interrupted").

There is currently no way to configure this: the 60-minute TTL is hardcoded (LocationActivity.node wires layer() without options) and the question tool has no built-in timeout.

Expected: a turn that is waiting on user input should not be treated as an inactive session. The pending question should remain answerable, or at minimum the interrupt should not abort it. Possible directions: exempt sessions with pending user-facing forms from the inactivity interrupt, refresh the TTL while a form is pending, or make the TTL configurable.

Plugins

@prevalentware/opencode-goal-plugin

OpenCode version

v2.0.24

Steps to reproduce

  1. Start a session in any project and prompt the agent to ask a question via the question tool (e.g. "Ask me a question using the question tool").
  2. Leave the question unanswered and the session idle for ~60 minutes (no new prompts or other session activity in that location).
  3. The question becomes unanswerable and the transcript shows "Tool execution interrupted"; the turn ends and the agent does not continue.

Observed once in normal use (question left unanswered for a long time); the code path above explains the mechanism.

Screenshot and/or share link

N/A

Operating System

Linux x86_64 (kernel 6.17.13)

Terminal

tmux (TERM=screen-256color), shell: zsh

Activity

  1. opencode-agent commented on Oct 10, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed write-up and the code pointers! I think this is a duplicate of #51343, which reports the same thing: the 60-minute location inactivity sweep interrupts a turn waiting on the question tool, and the TTL can't be configured.

    Possible duplicates and closely related issues/PRs, ordered by likelihood:

    The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different. Any extra details or repro notes are welcome on #51343.

  2. opencode-agent commented on Oct 11, 2026

    @opencode-agent
    Contributor

    Closing this as a duplicate of #51343. There's been no reply in the past day saying how this differs. #51343 covers the same problem: the 60-minute location inactivity sweep interrupts a turn waiting on the question tool, and the TTL can't be configured. Please follow that issue and the related PRs (#50499, #51583, #53238) for updates. If your case turns out to be different, reply here and we can reopen. Thanks again for the clear write-up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions