Fix runtime-backed IPC crashes during project open transitions#421
Draft
cursor[bot] wants to merge 1 commit into
Draft
Fix runtime-backed IPC crashes during project open transitions#421cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
In production (local-runtime-daemon mode), in-process diffService and agentChatService are null. Preload routes through the daemon when a project binding exists, but project.openRepo clears the binding while the switch is in flight. Read-only fallthrough to IPC then dereferenced null services. Route diff and agent-chat read IPC handlers through the local runtime pool when in-process services are null, using the window session project root (which main still exposes during the transition). Co-authored-by: Arul Sharma <arul28@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This was referenced May 30, 2026
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 production local-runtime-daemon mode (the default when
NODE_ENV !== "test"), in-processdiffServiceandagentChatServiceare intentionally null — real implementations live in the ade-runtime daemon.project.openRepoclears the preload project binding for the duration of the switch. Read-only UI polls (Lanes diff, Work chat list) that miss the daemon route fall through to IPC handlers that still calledctx.diffService.getChanges()/ctx.agentChatService.listSessions()on null, producing renderer crashes likeCannot read properties of null (reading 'getChanges').Root cause
#0f21fa1d fixed steady-state preload routing to the daemon, but IPC fallbacks remained unguarded. During transitions, preload intentionally returns
{ handled: false }for read-only chat (and has no binding for diff), so IPC was invoked with null in-process services.Fix
When in-process diff/chat services are null, route
diff.getChanges,diff.getFile,diff.getFilePatch,agentChat.list, andagentChat.getSummaryIPC handlers throughlocalRuntimeConnectionPoolusing the window session's local project root (same pattern aslanes.openFolderin #0f21fa1d).Validation
tryLocalRuntimeSyncusage.Other findings (not fixed here — existing PRs)
ALTERleak withoutcrsql_commit_alteron failure → Fix CRR alter leak and restore binding on failed remote switch #363projectBindingnull → Fix CRR alter leak and restore binding on failed remote switch #363claimTaskreclaims terminal done/failed tasks → ADE-58: Orchestration claimTask: reject claims against terminal (done/failed) tasks #420