Skip to content

fix(core_pool): release remote workspace when evict has no live core - #28

Draft
cursor[bot] wants to merge 1 commit into
masterfrom
cursor/critical-bug-management-a4ca
Draft

fix(core_pool): release remote workspace when evict has no live core#28
cursor[bot] wants to merge 1 commit into
masterfrom
cursor/critical-bug-management-a4ca

Conversation

@cursor

@cursor cursor Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Problem

After Core TTL eviction, delete_session and terminal_kill call evict(session_id, release_remote=True) expecting remote worker bindings to be torn down. evict() returned immediately when the session was not in _pool, so workspace_state and the worker session stayed active.

Trigger: User activates remote workspace → Core idles out (TTL) → user deletes the session → history/registry removed but remote binding persists → reused session_id routes bash/file to the old worker without /remote-use.

Fix

When evict() finds no live core but release_remote=True, call release_remote_workspace_session(None, ...) before returning.

Tests

  • test_evict_release_remote_without_live_core in tests/test_kernel_runtime.py
  • Existing test_evict_release_remote_closes_worker_workspace still passes
Open in Web View Automation 

After Core TTL eviction, delete_session and terminal_kill call
evict(release_remote=True) but previously returned immediately when
the session was not in _pool, leaving remote bindings and worker
sessions active for deleted session IDs.

Co-authored-by: Yuxuan Liu <liuyx2005@sjtu.edu.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant