Release v4.2.11: Cross-platform Claude path detection
Critical Bugfix: - Fixed SDK auto-detection failure by implementing explicit which/where commands - Unix/macOS: Uses 'which claude' command - Windows: Uses 'where claude' command (CMD and PowerShell compatible) - Fallback to CLAUDE_CODE_PATH environment variable - Handles Windows multiple results (takes first match) Impact: - Before: Worker failed with "path must be string, received undefined" - After: Worker correctly finds Claude executable on all platforms Technical changes: - Added findClaudePath() helper using child_process.execSync - Platform detection via process.platform === 'win32' - Updated src/sdk/worker.ts with explicit path detection - Updated src/services/worker-service.ts with explicit path detection - Bumped version to 4.2.11 in all metadata files - Updated CLAUDE.md with v4.2.11 release notes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
"name": "claude-mem",
|
"name": "claude-mem",
|
||||||
"version": "4.2.10",
|
"version": "4.2.11",
|
||||||
"source": "./plugin",
|
"source": "./plugin",
|
||||||
"description": "Persistent memory system for Claude Code - context compression across sessions"
|
"description": "Persistent memory system for Claude Code - context compression across sessions"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
Claude-mem is a persistent memory compression system that preserves context across Claude Code sessions. It automatically captures tool usage observations, processes them through the Claude Agent SDK, and makes summaries available to future sessions.
|
Claude-mem is a persistent memory compression system that preserves context across Claude Code sessions. It automatically captures tool usage observations, processes them through the Claude Agent SDK, and makes summaries available to future sessions.
|
||||||
|
|
||||||
**Current Version**: 4.2.10
|
**Current Version**: 4.2.11
|
||||||
**License**: AGPL-3.0
|
**License**: AGPL-3.0
|
||||||
**Author**: Alex Newman (@thedotmack)
|
**Author**: Alex Newman (@thedotmack)
|
||||||
|
|
||||||
@@ -210,25 +210,47 @@ npm run build && git commit -a -m "Build and update" && git push && cd ~/.claude
|
|||||||
|
|
||||||
## Version History
|
## Version History
|
||||||
|
|
||||||
### v4.2.10 (Current)
|
### v4.2.11 (Current)
|
||||||
**Breaking Changes**: None (patch version)
|
**Breaking Changes**: None (patch version)
|
||||||
|
|
||||||
**Critical Bugfix**:
|
**Critical Bugfix**:
|
||||||
- Fixed Windows compatibility issue caused by hardcoded macOS-specific Claude executable path
|
- Fixed SDK auto-detection failure by implementing explicit `which`/`where` command execution
|
||||||
- Removed hardcoded path: `/Users/alexnewman/.nvm/versions/node/v24.5.0/bin/claude`
|
- SDK's automatic Claude path detection was not working (returned undefined)
|
||||||
- Removed `pathToClaudeCodeExecutable` parameter from SDK query() calls
|
- Implemented cross-platform executable finder using `child_process.execSync`
|
||||||
- SDK now automatically detects Claude Code executable path on all platforms
|
- Unix/macOS: Uses `which claude` command
|
||||||
- Improves cross-platform compatibility (Windows, macOS, Linux)
|
- Windows: Uses `where claude` command (works in both CMD and PowerShell)
|
||||||
|
- Fallback to `CLAUDE_CODE_PATH` environment variable if set
|
||||||
|
- Handles Windows multiple results (takes first match)
|
||||||
|
|
||||||
**Impact**:
|
**Impact**:
|
||||||
- Before: Worker service failed on Windows due to hardcoded macOS path
|
- Before: Worker service failed with "path argument must be of type string. Received undefined"
|
||||||
- After: Worker service works correctly on all platforms
|
- After: Worker service correctly finds Claude executable on all platforms
|
||||||
|
|
||||||
**Technical Details**:
|
**Technical Details**:
|
||||||
- Updated `src/sdk/worker.ts` to remove hardcoded Claude path and `pathToClaudeCodeExecutable` parameter
|
- Added `findClaudePath()` helper function to both worker files
|
||||||
- Updated `src/services/worker-service.ts` to remove hardcoded Claude path and parameter
|
- Uses `process.platform === 'win32'` to detect Windows and choose appropriate command
|
||||||
- Built `plugin/scripts/worker-service.cjs` reflects changes
|
- Logs the discovered path for debugging: "Found Claude executable: /path/to/claude"
|
||||||
- Affects all SDK agent initialization in worker service
|
- Updated `src/sdk/worker.ts` with explicit path detection
|
||||||
|
- Updated `src/services/worker-service.ts` with explicit path detection
|
||||||
|
- Both files now pass `pathToClaudeCodeExecutable: claudePath` to SDK
|
||||||
|
|
||||||
|
**Files Changed**:
|
||||||
|
- `src/sdk/worker.ts`
|
||||||
|
- `src/services/worker-service.ts`
|
||||||
|
- `plugin/scripts/worker-service.cjs` (rebuilt)
|
||||||
|
|
||||||
|
### v4.2.10
|
||||||
|
**Breaking Changes**: None (patch version)
|
||||||
|
|
||||||
|
**Critical Bugfix**:
|
||||||
|
- Attempted to fix Windows compatibility by removing hardcoded macOS path
|
||||||
|
- Removed hardcoded path: `/Users/alexnewman/.nvm/versions/node/v24.5.0/bin/claude`
|
||||||
|
- Removed `pathToClaudeCodeExecutable` parameter to rely on SDK auto-detection
|
||||||
|
- **Note**: This approach failed; SDK auto-detection did not work (fixed in v4.2.11)
|
||||||
|
|
||||||
|
**Impact**:
|
||||||
|
- Partial fix: Removed hardcoded macOS path
|
||||||
|
- Issue: SDK auto-detection returned undefined, causing worker failures
|
||||||
|
|
||||||
**Files Changed**:
|
**Files Changed**:
|
||||||
- `src/sdk/worker.ts`
|
- `src/sdk/worker.ts`
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "claude-mem",
|
"name": "claude-mem",
|
||||||
"version": "4.2.10",
|
"version": "4.2.11",
|
||||||
"description": "Memory compression system for Claude Code - persist context across sessions",
|
"description": "Memory compression system for Claude Code - persist context across sessions",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"claude",
|
"claude",
|
||||||
|
|||||||
Reference in New Issue
Block a user