Skip to content

core: pending question forms cancelled by a location close get no cause or question content #52599

Open

Description

@thiago-carneiro

Description

When a location is evicted after 60 idle minutes, its pending question forms are cancelled when the location closes, with a bare { status: "cancelled" } — no reason, no content. The client that rendered the form sees the question cancel silently: the state does not say that the location was evicted, or which question was pending. In the tool failure reported back to the model, a close-caused cancel says only "Interaction cancelled because the location shut down" (#51647's symptom) — again without the pending question content.

The close path has no way to record why it is cancelling: Form.close cancels every pending form with no options, and the cancelled state has nowhere to carry a cause or the pending question content.

This issue is about the cancellation state and message, not the eviction policy — the policy is discussed in #51343, and restoring pending forms across reconnects is a separate issue (#44471).

OpenCode version

2.0.8

Steps to reproduce

  1. Start a session, get a question form pending, and let the session go idle (no active execution) until its location hits the 60-minute idle deadline.
  2. The location is evicted and the close cancels the pending form.
  3. Observe: the form's state is { status: "cancelled" } — no reason, no pending question content.

Expected: the cancelled state should include why it was cancelled (for eviction, cause: "evicted") and enough context to identify the pending question.

Activity

  1. github-actions commented on Oct 2, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    • #51343: Location eviction interrupts sessions and rejects pending questions.
    • #51647: The question tool receives the same location-shutdown cancellation message.
  2. thiago-carneiro commented on Oct 2, 2026

    @thiago-carneiro
    Author

    Not a duplicate, in my view. #51343 tracks the eviction policy (whether idle eviction should interrupt active work, and the hardcoded 60-minute deadline); #51647 is about the desktop app — the question tool aborts on location shutdown and the decision controls never render. This issue is only about the cancellation state and message: when a location close cancels a pending question, the form state is a bare cancelled with no cause, and the tool failure doesn't include the pending question. #52600 fixes that narrow part.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions