Skip to content

ctx-upgrade leaves old server process running (zombie instance on upgrade) #559

@ishabana

Description

@ishabana

Bug

Running ctx-upgrade installs the new plugin version and starts a new server process, but never terminates the old server process. Both versions run concurrently after every upgrade.

Reproduction

  1. Note the running node processes: ps aux | grep context-mode
  2. Run ctx-upgrade
  3. Check processes again — old version (1.0.x/start.mjs) is still alive alongside the new one

Impact

Each upgrade leaks a server process. If the user upgrades multiple times in a session (e.g. troubleshooting), multiple zombie instances accumulate. In combination with the WAL contention bug (see related issue), this caused a 238MB WAL file and every ctx_search call hanging indefinitely.

Expected behaviour

ctx-upgrade should send SIGTERM (or equivalent on Windows) to the currently running server before starting the new one.

Environment

  • Platform: Windows 11
  • Claude Code plugin
  • context-mode v1.0.125 → v1.0.127

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions