Skip to content

Windows local teardown treats live startup contention as a cleanup failure #2598

Closed

Description

@pcristin

Windows one-shot CLI clients can complete their work and then exit unsuccessfully while another client holds a startup gate.

This appeared twice in the cold-start storm guard for #2305:

Both reported:

coordination.cleanup_timeout component=local_transition_cleanup action=process_exit
codebase-memory-mcp: coordination cleanup timed out (local_transition_cleanup); terminating so the OS releases retained claims

The relevant daemon IPC and CLI cleanup code in #2305 is unchanged from upstream main at 879c11ea.

Windows local teardown reacquires startup-v2 and the validated legacy mutex before releasing its participant claim. The release API currently reports both a busy gate and a native cleanup failure as false, so the caller gives both the same 500 ms deadline. A healthy peer can hold the startup gate longer than that.

Expected behavior: retain the participant claim and wait for healthy contention using the existing bounded startup policy. Repeated native cleanup failures should retain their short fail-stop deadline.

I’m preparing a focused fix with a native Windows regression that holds the startup gate beyond 500 ms after indexing completes, then checks that releasing the gate lets the client exit successfully.

AI assistance: investigated and prepared with Codex on behalf of Pcristin.

Activity

  1. DeusData commented on Oct 19, 2026

    @DeusData
    Owner

    Thank you for the two failure references and for separating healthy startup contention from native cleanup failure. The proposed held-gate regression is useful context for a focused Windows fix. I have recorded this as a stability bug; the behavior and change still need verification.

  2. DeusData commented on Oct 20, 2026

    @DeusData
    Owner

    Fixed on main by #2599 (merge commit 94f952d), contributed by @pcristin -- thank you! On Windows, local teardown now waits out a live startup owner under the existing startup backstop instead of failing after 500 ms, while repeated native cleanup failures keep the short deadline.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingeditor/integrationEditor compatibility and CLI integrationstability/performanceServer crashes, OOM, hangs, high CPU/memorywindowsWindows-specific issues

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions