Fix runtime-backed sessions IPC crash during project open#443
Draft
cursor[bot] wants to merge 1 commit into
Draft
Fix runtime-backed sessions IPC crash during project open#443cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
…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>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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.
Bug and impact
In local-runtime-daemon mode, the in-process
sessionServiceandptyServiceare null — session work runs in the ade-runtime daemon. Duringproject.open/ project-switch transitions the preload binding is cleared briefly. Work tab polls that miss the daemon route fall through tosessions.list/sessions.getIPC handlers, which calledensureSessionContext()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
sessionsListandsessionsGetstill required in-process services unconditionally.Fix
tryLocalRuntimeActionhelper (same pattern as draft Fix runtime-backed IPC crashes during project open transitions #421).sessionServiceorptyServiceis null, routesessions.list/sessions.getthroughlocalRuntimeConnectionPool.callActionForRootusing the window's local project root.Validation
vitest run src/main/services/ipc/runtimeBridge.test.ts -t "routes sessions"(2 new tests)Related open PRs (not duplicated here)
agentChatGetEventHistoryguardwork.stopRuntimeenrich + PTY backpressure