Skip to content

v9.0.4: worker-service.cjs contains hardcoded version '9.0.3' causing infinite restart loop #669

Description

@Regis-RCR

Bug Description

The pre-built plugin/scripts/worker-service.cjs was not regenerated before the 9.0.4 release. It still contains the hardcoded version string from the previous release:

var zne="9.0.3"  // Should be "9.0.4"

Impact

This causes the plugin's version check logic to continuously detect a mismatch between:

  • Plugin version (from package.json): 9.0.4
  • Worker version (from /api/version endpoint): 9.0.3

The result is an infinite worker restart loop after every MCP request, preventing reliable observation creation.

Root Cause

The build script scripts/build-hooks.js correctly reads the version from package.json and injects it via esbuild:

define: {
  '__DEFAULT_PACKAGE_VERSION__': `"${version}"`
}

However, the bundle in plugin/scripts/worker-service.cjs was not regenerated before publishing v9.0.4.

Verification

# Check version in package.json
curl -s https://raw.githubusercontent.com/thedotmack/claude-mem/main/package.json | grep version
# Returns: "version": "9.0.4"

# Check version in pre-built bundle
curl -sL https://raw.githubusercontent.com/thedotmack/claude-mem/main/plugin/scripts/worker-service.cjs | grep -o 'var zne="[^"]*"'
# Returns: var zne="9.0.3"  <- WRONG

Temporary Workaround

Users can manually patch their local installation:

sed -i.bak 's/var zne="9\.0\.3"/var zne="9.0.4"/g' \
  ~/.claude/plugins/cache/thedotmack/claude-mem/9.0.4/scripts/worker-service.cjs

Suggested Fix

  1. Run node scripts/build-hooks.js to regenerate the bundle
  2. Consider adding a CI check to verify version consistency before releases

Environment

  • macOS Darwin 25.2.0
  • Bun v1.3.3
  • claude-mem v9.0.4

Note: This is the same issue that affected v9.0.3 (the bundle contained "9.0.2"). The build process needs a version consistency check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions