Files
claude-mem/cursor-hooks/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

6.4 KiB

# Recent Activity

Dec 29, 2025

save-file-edit.sh

ID Time T Title Read
#34270 10:45 PM 🔵 Save File Edit Hook Captures File Modifications as Tool Observations ~495

session-summary.sh

ID Time T Title Read
#34268 10:44 PM 🔵 Session Summary Hook Generates Summaries and Updates Context on Stop ~498

save-observation.sh

ID Time T Title Read
#34267 10:44 PM 🔵 Save Observation Hook Captures MCP and Shell Executions ~494

context-inject.sh

ID Time T Title Read
#34266 10:44 PM 🔵 Context Inject Hook Refreshes Memory Context Before Prompt Submission ~498
#34165 9:41 PM 🔵 Context Injection Hook Implementation for Cursor ~466

session-init.sh

ID Time T Title Read
#34264 10:43 PM 🔵 Session Init Hook Initializes Sessions on Prompt Submission ~514

common.sh

ID Time T Title Read
#34261 10:43 PM 🔵 Cursor Hooks Common Shell Library Provides Core Utilities ~381
#34237 10:31 PM 🔄 Removed arbitrary array index validation from json_get function ~421

STANDALONE-SETUP.md

ID Time T Title Read
#34258 10:39 PM Updated STANDALONE-SETUP.md to recommend user-level installation ~265
#34257 " 🔵 Claude-Mem Command Reference for Cursor Integration ~245
#34256 " Updated STANDALONE-SETUP.md to recommend user-level installation ~305
#34252 10:38 PM 🔵 Cursor Hooks Installation and Worker Setup Process ~258
#34224 10:14 PM Completed Bun Migration by Updating All Windows Commands ~392
#34223 " Updated Windows Installation Commands to Use Bun ~354
#34222 10:13 PM Updated Quick Reference Table to Use Bun Commands ~361
#34221 " Updated Step 5 Status Check Command to Use Bun ~353
#34220 " Updated Step 4 Worker Start Command to Use Bun ~360
#34219 10:12 PM Updated Step 3 Hook Installation Commands to Use Bun ~322
#34218 " Updated STANDALONE-SETUP Step 1 Commands to Use Bun Instead of NPM ~357
#34217 " Updated STANDALONE-SETUP Prerequisites to Require Bun Runtime ~341
#34215 10:08 PM 🔵 Retrieved Detailed Cursor Integration Implementation History ~676
#34214 10:07 PM 🔵 Cursor Integration Feature Set Discovered via Memory Search ~427

QUICKSTART.md

ID Time T Title Read
#34255 10:39 PM Quickstart Documentation Reordered to Recommend User-Level Installation First ~265
#34251 10:38 PM 🔵 Quickstart Documentation Shows CLI-Based Installation Method ~257
#34225 10:14 PM Updated QUICKSTART Worker Restart Command to Use Bun ~308

README.md

ID Time T Title Read
#34254 10:38 PM Updated README to recommend user-level installation over project-level ~345
#34253 " 🔵 Cursor hooks installation documented with quick install CLI and manual options ~327
#34250 " 🔵 Documentation references installation types and project-level concepts ~311
#34226 10:14 PM Updated README Quick Install Commands to Use Bun ~311

install.sh

ID Time T Title Read
#34249 10:37 PM Install Script Usage Message Updated to Recommend User-Level Installation ~256
#34248 " Marked user-level installation as recommended in install script ~255
#34246 " Simplified path rewriting logic after enterprise mode removal ~291
#34245 " Simplified conditional logic after removing enterprise installation code ~266
#34244 10:36 PM Removed enterprise installation mode from cursor-hooks installer ~298
#34243 " Removed enterprise installation option from Cursor hooks installer ~292
#34242 " 🔵 Cursor hooks installation script copies and configures hooks with path adjustments ~387
#34240 10:33 PM 🔵 Cursor hooks installation paths and requirements vary by deployment mode ~312
#34239 " 🔵 Cursor hooks installation supports enterprise mode ~240
#34233 10:26 PM ⚖️ Implemented PR 493 fixes with mixed necessity and complexity trade-offs ~610
#34232 " 🔵 PR 493 review identified security and concurrency issues requiring fixes ~560
#34228 10:21 PM 🔴 Fixed sed portability issue in install.sh ~318

common.ps1

ID Time T Title Read
#34238 10:31 PM 🔄 Rollback complete: simplified over-engineered concurrency and validation code ~434
#34231 10:25 PM 🔴 Fixed race conditions and security vulnerabilities in Cursor integration ~562

hooks.json

ID Time T Title Read
#34184 9:51 PM 🔵 Cursor Hooks Configuration Schema ~375

Dec 31, 2025

session-init.sh

ID Time T Title Read
#34675 3:37 PM 🔵 API Endpoint /api/sessions/init Expects contentSessionId Parameter ~401

Jan 5, 2026

CLAUDE.md

ID Time T Title Read
#38078 9:54 PM CLAUDE.md Documentation Cleanup - 1,233 Lines Removed Across 18 Files ~590

INTEGRATION.md

ID Time T Title Read
#37995 9:01 PM 🔵 CLAUDE_MEM_WORKER_HOST setting implementation pattern ~304

README.md

ID Time T Title Read
#37990 9:00 PM 🔵 CLAUDE_MEM_WORKER_HOST setting used across 19 files ~289

Jan 7, 2026

CLAUDE.md

ID Time T Title Read
#38195 7:35 PM Context-hook enhanced with promotional footer and user-message-hook removed from SessionStart ~376
#38194 " 🔵 Working tree contains 10 modified files ready for commit ~303