claude-mem v12.0.0
A major release delivering intelligent file-read gating, expanded language support for smart-explore, platform source isolation, and 40+ bug fixes across Windows, Linux, and macOS.
Highlights
File-Read Decision Gate
Claude Code now intelligently gates redundant file reads. When a file has prior observations in the timeline, the PreToolUse hook injects the observation history and blocks the read — saving tokens and keeping context focused. The gate supports both Read and Edit tools, uses permissionDecision deny with a rich timeline payload, and includes file-size thresholds and observation deduplication.
Smart-Explore: 24 Language Support
The smart-explore skill now supports 24 programming languages via tree-sitter AST parsing: TypeScript, JavaScript, Python, Rust, Go, Java, C, C++, C#, Ruby, PHP, Swift, Kotlin, Scala, Bash, CSS, SCSS, HTML, Lua, Haskell, Elixir, Zig, TOML, and YAML. User-installable grammars with --legacy-peer-deps support for tree-sitter version conflicts.
Platform Source Isolation
Claude and Codex sessions are now fully isolated with platform_source column on sdk_sessions. Each platform gets its own session namespace, preventing cross-contamination between different AI coding tools. Normalized at route boundaries for consistent behavior.
Codex & OpenClaw Support
- Codex plugin manifest added for marketplace discoverability
- OpenClaw:
workerHostconfig for Docker deployments - OpenClaw: handle stale
plugins.allowand non-interactive TTY in installer
New Features
- File-read decision gate — blocks redundant file reads with observation timeline injection (#1564, #1629, #1641)
- 24-language smart-explore — AST-based code exploration across all major languages
- Platform source isolation — Claude/Codex session namespacing with DB migration
- CLAUDE.local.md support —
CLAUDE_MEM_FOLDER_USE_LOCAL_MDsetting for writing to local-only config - OpenClaw workerHost — Docker deployment support for OpenClaw plugin
- Codex plugin manifest — discoverability in Codex marketplace
- File-size threshold — skip file-read gating for small files
- Observation deduplication — prevent duplicate observations in timeline gate
Bug Fixes
Worker & Startup
- Fix worker startup crash with missing observation columns (#1641)
- Fix SessionStart hooks failing on cold start due to worker race condition
- Fix worker daemon being killed by its own hooks (#1490)
- Fail worker-start hook if worker never becomes healthy
- Fix readiness timeout logging on reused-worker path (#1491)
- Remove dead
USER_MESSAGE_ONLYexit code that caused SessionStart hook errors - Decouple MCP health from loopback self-check
Data Integrity
- Fix migration version conflict:
addSessionPlatformSourceColumnnow correctly uses v25 - Add migration for
generated_by_modelandrelevance_countcolumns - Wire
generated_by_modelinto observation write path - Use null-byte delimiter in observation content hash to prevent collisions
- Persist session completion to database in
completeByDbId(#1532) - Handle bare path strings in
files_modified/files_readcolumns (#1359) - Guard
json_each()calls against legacy bare-path rows - Deduplicate session init to prevent multiple prompt records
Security
- Prevent shell injection in summary workflow (#1285)
- Sanitize observation titles in file-context deny reason (strip newlines, collapse whitespace)
- Normalize
platformSourceat route boundary to prevent filter inconsistencies - Escape
filePathin recovery hints to prevent malformed output - Address path safety, SQL injection, and gate scoping in file-read hook
Windows
- Fix
isMainModuleCJS branch failure on Bun — addCLAUDE_MEM_MANAGEDfallback - Use
cmd /cto executebun.cmdon Windows - Prefer
bun.cmdover bun shell script on Windows - Add
shell: trueon Windows to spawn bun from npm
Cross-Platform
- Replace GNU
sort -Vwith POSIX-portable version sort - Resolve
node not foundon nvm/homebrew installations - Resolve hook failures when
CLAUDE_PLUGIN_ROOTis not injected (#1533) - Fix bun-runner signal exit handling — scope to
startsubcommand only - Guard
/streamSSE endpoint with 503 before DB initialization - Provide empty JSON fallback when stdin is not piped (#1560)
Parser & Content
- Strip
<persisted-output>tags from memory - Strip
<system-reminder>tags from persisted memory and DRY up regex - Skip
parseSummaryfalse positives with no sub-tags (#1360) - Handle bare filenames in
regenerate-claude-md.ts(#1514) - Handle bare filenames in
path-utils.ts isDirectChild - Handle single-quoted paths and dangling var edge case
- Strip hardcoded
__dirname/__filenamefrom bundled CJS output - Add PHP grammar support to smart-file-read parser (#1617)
Installer & Config
- Make post-install allowlist write guaranteed
- Harden plugin manifest sync script
- Fix
expand ~to home directory before project resolution - Update default model from
claude-sonnet-4-5toclaude-sonnet-4-6(#1390) - Fix Gemini conversation history truncation to prevent O(N²) token cost growth
Refactoring
- Rename formatters to
AgentFormatter/HumanFormatterfor semantic clarity
Full Changelog: v11.0.1...v12.0.0