Files
claude-mem/plugin/scripts/CLAUDE.md
T
Alex Newman 2659ec3231 fix: Claude Code 2.1.1 compatibility + log-level audit + path validation fixes (#614)
* Refactor CLAUDE.md and related files for December 2025 updates

- Updated CLAUDE.md in src/services/worker with new entries for December 2025, including changes to Search.ts, GeminiAgent.ts, SDKAgent.ts, and SessionManager.ts.
- Revised CLAUDE.md in src/shared to reflect updates and new entries for December 2025, including paths.ts and worker-utils.ts.
- Modified hook-constants.ts to clarify exit codes and their behaviors.
- Added comprehensive hooks reference documentation for Claude Code, detailing usage, events, and examples.
- Created initial CLAUDE.md files in various directories to track recent activity.

* fix: Merge user-message-hook output into context-hook hookSpecificOutput

- Add footer message to additionalContext in context-hook.ts
- Remove user-message-hook from SessionStart hooks array
- Fixes issue where stderr+exit(1) approach was silently discarded

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

* Update logs and documentation for recent plugin and worker service changes

- Added detailed logs for worker service activities from Dec 10, 2025 to Jan 7, 2026, including initialization patterns, cleanup confirmations, and diagnostic logging.
- Updated plugin documentation with recent activities, including plugin synchronization and configuration changes from Dec 3, 2025 to Jan 7, 2026.
- Enhanced the context hook and worker service logs to reflect improvements and fixes in the plugin architecture.
- Documented the migration and verification processes for the Claude memory system and its integration with the marketplace.

* Refactor hooks architecture and remove deprecated user-message-hook

- Updated hook configurations in CLAUDE.md and hooks.json to reflect changes in session start behavior.
- Removed user-message-hook functionality as it is no longer utilized in Claude Code 2.1.0; context is now injected silently.
- Enhanced context-hook to handle session context injection without user-visible messages.
- Cleaned up documentation across multiple files to align with the new hook structure and removed references to obsolete hooks.
- Adjusted timing and command execution for hooks to improve performance and reliability.

* fix: Address PR #610 review issues

- Replace USER_MESSAGE_ONLY test with BLOCKING_ERROR test in hook-constants.test.ts
- Standardize Claude Code 2.1.0 note wording across all three documentation files
- Exclude deprecated user-message-hook.ts from logger-usage-standards test

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

* fix: Remove hardcoded fake token counts from context injection

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

* Address PR #610 review issues by fixing test files, standardizing documentation notes, and verifying code quality improvements.

* fix: Add path validation to CLAUDE.md distribution to prevent invalid directory creation

- Add isValidPathForClaudeMd() function to reject invalid paths:
  - Tilde paths (~) that Node.js doesn't expand
  - URLs (http://, https://)
  - Paths with spaces (likely command text or PR references)
  - Paths with # (GitHub issue/PR references)
  - Relative paths that escape project boundary

- Integrate validation in updateFolderClaudeMdFiles loop
- Add 6 unit tests for path validation
- Update .gitignore to prevent accidental commit of malformed directories
- Clean up existing invalid directories (~/, PR #610..., git diff..., https:)

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

* fix: Implement path validation in CLAUDE.md generation to prevent invalid directory creation

- Added `isValidPathForClaudeMd()` function to validate file paths in `src/utils/claude-md-utils.ts`.
- Integrated path validation in `updateFolderClaudeMdFiles` to skip invalid paths.
- Added 6 new unit tests in `tests/utils/claude-md-utils.test.ts` to cover various rejection cases.
- Updated `.gitignore` to prevent tracking of invalid directories.
- Cleaned up existing invalid directories in the repository.

* feat: Promote critical WARN logs to ERROR level across codebase

Comprehensive log-level audit promoting 38+ WARN messages to ERROR for
improved debugging and incident response:

- Parser: observation type errors, data contamination
- SDK/Agents: empty init responses (Gemini, OpenRouter)
- Worker/Queue: session recovery, auto-recovery failures
- Chroma: sync failures, search failures (now treated as critical)
- SQLite: search failures (primary data store)
- Session/Generator: failures, missing context
- Infrastructure: shutdown, process management failures
- File Operations: CLAUDE.md updates, config reads
- Branch Management: recovery checkout failures

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

* fix: Address PR #614 review issues

- Remove incorrectly tracked tilde-prefixed files from git
- Fix absolute path validation to check projectRoot boundaries
- Add test coverage for absolute path validation edge cases

Closes review issues:
- Issue 1: ~/ prefixed files removed from tracking
- Issue 3: Absolute paths now validated against projectRoot
- Issue 4: Added 3 new test cases for absolute path scenarios

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

* build assets and context

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 23:34:20 -05:00

5.7 KiB

# Recent Activity

Dec 4, 2025

ID Time T Title Read
#20052 3:23 PM Built and deployed version 6.5.2 to marketplace ~321

Dec 7, 2025

ID Time T Title Read
#21251 6:06 PM 🔵 Context Hook Plugin Architecture and Worker Communication ~405

Dec 8, 2025

ID Time T Title Read
#22092 6:40 PM 🔵 Queue Depth Check Not Found in Minified Code ~217
#22091 " 🔵 Save Hook Script Structure Revealed ~472
#22085 6:34 PM 🔵 Examined pre-tool-use-hook.js implementation showing timing-only logic ~330

Dec 9, 2025

ID Time T Title Read
#22557 1:08 AM Build completed for version 7.0.3 ~342

Dec 10, 2025

ID Time T Title Read
#23444 2:25 PM 🟣 Build Pipeline Execution Successful ~293

Dec 11, 2025

ID Time T Title Read
#24057 2:56 PM Hook Scripts Shebang Verification ~294
#24056 2:55 PM Worker CLI Shebang Verification ~258
#24055 " Build Successful with Bun Runtime Shebangs ~355

Dec 12, 2025

ID Time T Title Read
#24636 10:46 PM 🔵 Duplicate Smart Install Scripts in Project Structure ~288
#24635 " 🔵 Claude-Mem Smart Install Script Architecture ~371
#24359 7:00 PM 🟣 Phase 1 Critical Code Fixes Completed via Agent Task ~441
#24358 6:59 PM Completed Phase 1 Code Fixes for better-sqlite3 Migration ~385
#24357 " Removed createRequire Import from smart-install.js ~284
#24356 " Removed Native Module Verification from main() Function ~384
#24355 " Removed better-sqlite3 Error Detection from runNpmInstall() ~324
#24354 6:58 PM Removed getWindowsErrorHelp() Function from smart-install.js ~356
#24353 " Removed verifyNativeModules() Function from smart-install.js ~340
#24352 " Removed better-sqlite3 Existence Check from needsInstall() ~266
#24351 " Removed BETTER_SQLITE3_PATH Constant from smart-install.js ~226
#24344 6:56 PM 🔵 smart-install.js Contains Obsolete better-sqlite3 Dependencies ~380

Dec 13, 2025

ID Time T Title Read
#25286 8:41 PM 🔵 New Hook Fails with Node.js Path Error ~298
#25285 " 🔵 Context Hook Runs Successfully with Node.js ~306
#25283 " 🔵 Bun Wrapper Analysis: Fallback Detection System ~416

Dec 14, 2025

ID Time T Title Read
#26800 11:39 PM Version 7.2.3 Build Complete With Worker Restart Fix ~394
#26791 11:38 PM Phase 3 Complete: Project Built Successfully With Worker Restart Fix ~446
#26720 11:23 PM 🔵 Smart Install Handles Dependencies But No Worker Coordination ~468
#26719 " 🔵 Worker CLI Provides Start/Stop/Restart Commands With Health Check Validation ~490
#26718 " 🔵 Worker CLI Restart Implementation Details ~452
#26717 11:22 PM 🔵 Context Hook Worker Startup Logic Handles Initial Start But Not Post-Update Restart ~485
#26716 " 🔵 Context Hook Worker Startup Logic Revealed ~538
#26715 " 🔵 Smart Install Script Handles Dependency Installation Without Worker Restart ~430
#26052 7:13 PM 🔵 Examined Minified Context Hook Source Code ~285
#25686 4:22 PM 🔵 SessionRoutes tracks missing last_user_message errors at two different locations ~456
#25685 " 🔵 Progress summary generation system uses Claude to create XML-formatted session checkpoints ~461

Dec 16, 2025

ID Time T Title Read
#27554 4:48 PM Project built successfully with version 7.3.1 ~306

Dec 17, 2025

ID Time T Title Read
#28924 7:29 PM 🔵 Plugin MCP Server Uses Bun Runtime ~283

Dec 26, 2025

ID Time T Title Read
#32983 11:04 PM 🟣 Complete build and deployment pipeline executed ~260

Jan 4, 2026

ID Time T Title Read
#36873 1:55 AM 🔵 Smart-Install Script Analyzed for Homebrew Path Implementation ~466

Jan 7, 2026

ID Time T Title Read
#38169 7:21 PM 🔵 SessionStart Hook Output Pattern Investigation Complete ~464
#38168 " 🔵 Smart-Install Script Outputs All Status Messages to stderr via console.error ~438
#38167 7:20 PM 🔵 Context-Hook Uses stdin Event Handlers for Non-TTY JSON Output Mode ~396
#38166 " 🔵 User-Message-Hook Executes at Top Level with Await and Exit Code 1 ~423
#38165 " 🔵 Context-Hook Has Minimal Console Output in Compiled Code ~333
#38164 " 🔵 Worker-Service Script is Large 1575-Line Multi-Purpose Service Manager ~352
#38163 7:19 PM 🔵 Worker-Service Script Uses console.log and console.error for Output ~385
#38162 " 🔵 Smart-Install Script Auto-Installs Bun and UV Dependencies ~495
#38161 " 🔵 User-Message-Hook Outputs to stderr and Exits with Code 1 ~211
#38160 7:18 PM 🔵 Context-Hook Returns JSON with hookSpecificOutput Structure ~470