Files
claude-mem/src/shared/CLAUDE.md
T
Alex Newman 4df9f61347 refactor: implement in-process worker architecture for hooks (#722)
* fix: stop generating empty CLAUDE.md files

- Return empty string instead of "No recent activity" when no observations exist
- Skip writing CLAUDE.md files when formatted content is empty
- Remove redundant "auto-generated by claude-mem" HTML comment
- Clean up 98 existing empty CLAUDE.md files across the codebase
- Update tests to expect empty string for empty input

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* build assets

* refactor: implement in-process worker architecture for hooks

Replaces spawn-based worker startup with in-process architecture:
- Hook processes now become the worker when port 37777 is free
- Eliminates Windows spawn issues (NO SPAWN rule)
- SessionStart chains: smart-install && stop && context

Key changes:
- worker-service.ts: hook case starts WorkerService in-process
- hook-command.ts: skipExit option prevents process.exit() when hosting worker
- hooks.json: single chained command replaces separate start/hook commands
- worker-utils.ts: ensureWorkerRunning() returns boolean, doesn't block
- handlers: graceful fallback when worker unavailable

All 761 tests pass. Manual verification confirms hook stays alive as worker.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* context

* a

* MAESTRO: Mark PR #722 test verification task complete

All 797 tests passed (3 skipped, 0 failed) after merge conflict resolution.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* MAESTRO: Mark PR #722 build verification task complete

* MAESTRO: Mark PR #722 code review task complete

Code review verified:
- worker-service.ts hook case starts WorkerService in-process
- hook-command.ts has skipExit option
- hooks.json uses single chained command
- worker-utils.ts ensureWorkerRunning() returns boolean

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* MAESTRO: Mark PR #722 conflict resolution push task complete

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 19:49:15 -05:00

5.8 KiB

# Recent Activity

Nov 10, 2025

ID Time T Title Read
#6295 1:18 PM 🔵 Path Configuration Structure for claude-mem ~305

Dec 5, 2025

ID Time T Title Read
#20730 9:06 PM 🔵 Path Configuration Module with ESM/CJS Compatibility ~578
#20718 9:00 PM 🔵 Worker Service Auto-Start and Health Check System ~448
#20410 7:21 PM 🔵 Path utilities provide cross-runtime directory management with Claude integration support ~478
#20409 7:20 PM 🔵 Worker utilities provide automatic PM2 startup with health checking and port configuration ~479

Dec 9, 2025

ID Time T Title Read
#23141 6:42 PM 🔵 Located getSettingsPath Function in paths.ts ~261
#23134 6:41 PM Set CLAUDE_MEM_SKIP_TOOLS Default Value in SettingsDefaultsManager ~261
#23133 " Added CLAUDE_MEM_SKIP_TOOLS to SettingsDefaults Interface ~231
#23131 6:40 PM 🔵 SettingsDefaultsManager Structure and Configuration Schema ~363
#22858 2:28 PM 🔄 Removed Brittle save.md Validation from paths.ts ~305
#22852 2:26 PM 🔵 Located save.md Validation Logic in paths.ts ~255
#22805 2:01 PM 🔵 Early Settings Silent Failure Point Identified ~363
#22803 " 🔵 Worker Utilities Current Implementation Review ~390
#22518 12:59 AM 🔵 Worker Utils StartWorker Implementation Uses Plugin Root for PM2 ~311

Dec 10, 2025

ID Time T Title Read
#23831 11:15 PM 🔵 Current hook-error-handler.ts References PM2 ~277
#23830 " 🔵 Current worker-utils.ts Implementation Uses PM2 ~431
#23812 10:49 PM 🔵 Current Worker Startup Uses PM2 and PowerShell; Phase 2 Will Replace ~428
#23811 " 🔵 Existing Paths Configuration for Phase 2 Reference ~297

Dec 12, 2025

ID Time T Title Read
#24405 8:12 PM 🔵 PM2 Legacy Cleanup Migration in Worker Startup ~303
#24400 8:10 PM 🔵 Retrieved PM2 Cleanup Implementation Details from Memory ~355
#24362 7:00 PM 🟣 Implemented PM2 Cleanup One-Time Marker in worker-utils.ts ~376
#24361 " Added File System Imports to worker-utils.ts for PM2 Marker ~263
#24360 " 🔵 worker-utils.ts Contains PM2 Cleanup Logic Without One-Time Marker ~390

Dec 13, 2025

ID Time T Title Read
#25088 7:18 PM 🟣 Added CLAUDE_MEM_EMBEDDING_FUNCTION to Settings Interface ~269

Dec 14, 2025

ID Time T Title Read
#26790 11:38 PM 🔴 Fixed Undefined Port Variable in Error Logger ~340
#26789 " 🔴 Fixed Undefined Port Variable in Error Logging ~316
#26788 " 🔵 Worker Utils Already Imports Required Dependencies for Implementation ~283
#26787 " 🟣 Phase 2 Complete: Pre-Restart Delay Added to Version Mismatch Handler ~436
#26786 " 🟣 Phase 2 Complete: Pre-Restart Delay Added to ensureWorkerVersionMatches Function ~420
#26785 11:37 PM 🟣 Phase 1 Complete: PRE_RESTART_SETTLE_DELAY Constant Added to Hook Timeouts ~351
#26784 " 🟣 Phase 1 Complete: PRE_RESTART_SETTLE_DELAY Constant Added to HOOK_TIMEOUTS ~370
#26783 " 🔵 Hook Constants File Defines Timeout Values and Platform Multiplier ~452
#26782 " 🔵 hook-constants.ts Defines Timeout Constants With Windows Platform Multiplier ~418
#26766 11:30 PM ⚖️ Root Cause Identified: Missing Post-Install Worker Restart Trigger in Plugin Update Flow ~604
#26765 " 🔵 Explore Agent Confirms Root Cause: No Proactive Worker Restart After Plugin Updates ~613
#26732 11:25 PM 🔵 Worker Utils Implements Version Mismatch Detection and Auto-Restart ~516
#26731 11:24 PM 🔵 ensureWorkerRunning Implementation Shows 2.5 Second Startup Wait With Version Check ~522
#25695 4:27 PM 🟣 Added comprehensive error logging to transcript parser for debugging message extraction failures ~473
#25693 4:24 PM 🔵 Transcript parser extracts messages from JSONL file by scanning backwards for role-specific entries ~491

Dec 17, 2025

ID Time T Title Read
#28464 4:25 PM 🔵 Platform-Adjusted Hook Timeout Configuration ~468
#28461 " 🔵 Dual ESM/CJS Path Resolution System ~479
#28452 4:23 PM 🔵 Worker Version Matching and Auto-Restart System ~510

Dec 18, 2025

ID Time T Title Read
#29797 7:09 PM 🔵 Settings System Uses CLAUDE_MEM_MODE for Mode Selection ~353
#29234 12:10 AM 🔵 Centralized Settings Management with Environment Defaults ~394

Dec 20, 2025

ID Time T Title Read
#31086 7:59 PM 🔵 Transcript Parser Extracts Messages from JSONL Hook Files ~327
#30939 6:57 PM 🔵 Worker Utils File Examined for Error Handling Inconsistency ~393
#30855 6:22 PM 🔵 Transcript Parser Content Format Handling Examined ~406

Dec 25, 2025

ID Time T Title Read
#32616 8:43 PM 🔵 Comprehensive analysis of "enable billing" setting and its impact on rate limiting ~533
#32538 7:28 PM Set default Gemini billing to disabled ~164

Jan 7, 2026

ID Time T Title Read
#38175 7:26 PM 🔵 Complete Claude-Mem Hook Output Architecture Documented ~530