Skip to content

Fix runtime-backed sessions IPC crash during project open#443

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-correctness-bugs-4b70
Draft

Fix runtime-backed sessions IPC crash during project open#443
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-correctness-bugs-4b70

Conversation

@cursor
Copy link
Copy Markdown
Contributor

@cursor cursor Bot commented May 30, 2026

Bug and impact

In local-runtime-daemon mode, the in-process sessionService and ptyService are null — session work runs in the ade-runtime daemon. During project.open / project-switch transitions the preload binding is cleared briefly. Work tab polls that miss the daemon route fall through to sessions.list / sessions.get IPC handlers, which called ensureSessionContext() and crashed the renderer (This project action is unavailable until ADE is connected…).

Trigger: Open or switch projects while the Work tab is visible; a session list/detail poll hits IPC between binding clear and runtime reconnect.

Root cause

#421 and recent guards fixed chat/diff IPC fallbacks, but sessionsList and sessionsGet still required in-process services unconditionally.

Fix

Validation

  • vitest run src/main/services/ipc/runtimeBridge.test.ts -t "routes sessions" (2 new tests)

Related open PRs (not duplicated here)

Open in Web View Automation 

…ss services are null

In local-runtime-daemon mode the renderer context has null sessionService
and ptyService. During project-open transitions the preload binding is
cleared and Work tab polls fall through to IPC; ensureSessionContext then
threw and crashed the renderer.

Mirror the tryLocalRuntimeAction pattern used for chat/diff handlers:
forward sessions.list and sessions.get to the ade-runtime daemon when
in-process services are unavailable.

Co-authored-by: Arul Sharma <arul28@users.noreply.github.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ade Ignored Ignored Preview May 30, 2026 8:11am

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