Skip to content

Windows: the lazy Named Pipe channel does not retry a busy pipe #4251

Closed

Description

@mstomar125

Overview

On Windows the app's lazy Named Pipe channel opens the pipe directly, with no retry when the pipe is busy. The eager channel retries ERROR_PIPE_BUSY. The node watcher, the token stream and the first requests use the lazy one, so at startup they can fail once and recover on the next attempt, with a warning in the log each time.

Problem Statement

  • packages/desktop-app/app-lib/src/services/grpc_client.rs, pipe_channel_lazy, opens the pipe with ClientOptions::new().open(&pipe) directly.
  • open_pipe_when_free, which waits and retries on ERROR_PIPE_BUSY, is used only by the eager pipe_channel.
  • The daemon creates the next pipe instance only after accepting a connection, so a client that connects while all instances are busy gets ERROR_PIPE_BUSY.
  • Found while reviewing the change that lets the node watcher run on Windows. It is not new, but the watcher now depends on this path. It heals on the watcher's own 1 s retry, so the effect is a warning, not a failure.

Proposed Solution

Make the lazy channel open the pipe through open_pipe_when_free too, with the same bound as the eager path. Cover it with a test that holds the pipe busy for a short time and asserts the lazy client connects once it frees up.

Acceptance

  • The lazy pipe channel retries a busy pipe within a bounded wait.
  • A test pins it.

🤖 Generated with Claude Code

Activity

  1. added
    bug
    on Nov 5, 2026
  2. self-assigned this
    on Nov 5, 2026
  3. mstomar125 commented on Nov 6, 2026

    @mstomar125
    ContributorAuthor

    Picking this up (sweep drain).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugdesktop-app

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions