{{ message }}
fix(core): retain locations while sessions are executing - #47626
Closed
kitlangton wants to merge 1 commit into
Closed
fix(core): retain locations while sessions are executing#47626kitlangton wants to merge 1 commit into
kitlangton wants to merge 1 commit into
Conversation
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Why
Leave a question unanswered beyond the location inactivity deadline, then submit an answer: the question disappears and the session keeps showing progress indefinitely. Idle cleanup removes the location's cache entry while the running tool still holds its old form service, so subsequent form requests reach an empty replacement and return 404.
What Changes
Before evicting expired locations, consult process-local session execution ownership and resolve those sessions' current locations. Refresh the deadline for an occupied location; continue evicting genuinely idle locations.
Location Lifetime
Waiting for human input or a long-running tool need not emit session events. Execution ownership, rather than event silence alone, now protects the location from inactivity eviction.
flowchart LR Deadline[Location inactivity deadline] --> Active{Active execution at this location?} Active -->|Yes| Retain[Refresh deadline and retain services] Active -->|No| Evict[Evict idle location]Demo
Same deterministic OpenCode Drive 2.1.0 fixture and Enter keypress on both sides. Before:
b2cecc6350. After:ff09490bcc. Real production TUI and question tool with simulated model responses. For both captures only, the existing 60-minute deadline was shortened to 5 seconds and the 1-minute sweep to 1 second; these timing changes are not in the PR. Playback begins after the deadline has elapsed.question-before-after.mp4
Scope
This change owns inactivity-eviction eligibility and its regression coverage. The production inactivity duration remains 60 minutes.
Verification