The Claude Memory Compiler is intentionally low-configuration: most defaults work well without any changes. The values below are the ones you are most likely to want to adjust, along with where each one lives in the source. All changes require editing the source file directly — there is no central config file.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/coleam00/claude-memory-compiler/llms.txt
Use this file to discover all available pages before exploring further.
Runtime constants
COMPILE_AFTER_HOUR
File: scripts/flush.py, line 142
flush.py checks whether the local hour is greater than or equal to this value. If it is, and today’s daily log has changed since its last compilation hash was recorded in scripts/state.json, compile.py is spawned as a detached background process.
The default of 18 means compilation triggers automatically on the first session that ends after 6 PM. Change this to any integer in the range 0–23 to shift the compile window earlier or later.
COMPILE_AFTER_HOUR uses local time via datetime.now(timezone.utc).astimezone(). If you work across time zones, be aware that the trigger follows the system clock of the machine running Claude Code.MAX_CONTEXT_CHARS
File: hooks/session-start.py, line 30
SessionStart hook. The hook assembles the current date, knowledge/index.md, and the tail of the most recent daily log, then hard-truncates the result at this limit with a ...(truncated) suffix.
Increase this value if your index has grown large and you want more of it to be visible at session start. Decrease it if you want to reduce the overhead on every session’s initial context. Note that a larger MAX_CONTEXT_CHARS slightly increases the token cost of the first message in every session.
MAX_LOG_LINES
File: hooks/session-start.py, line 31
SessionStart context injection. The hook reads daily/YYYY-MM-DD.md and slices the last MAX_LOG_LINES lines before appending them to the injected context.
Increase this value if you want Claude to see more recent session history at startup. Decrease it to keep the injected context smaller.
Deduplication window
File:scripts/flush.py, line 210
flush.py skips a flush if the same session_id was processed within the last 60 seconds. This prevents double-flushing when pre-compact.py and session-end.py both fire in quick succession at the end of a session.
To widen the dedup window (for example, to 120 seconds), change the 60 in that condition.
Hook timeouts
Hook timeouts are set in.claude/settings.json:
| Hook | Default timeout | Notes |
|---|---|---|
SessionStart | 15 s | Pure file I/O; typically finishes in under 1 s. The extra margin covers slow disks or large index files. |
PreCompact | 10 s | JSONL parsing and a subprocess spawn; completes in 1–3 s in practice. |
SessionEnd | 10 s | Same architecture as PreCompact; identical timing profile. |
Custom article types
The knowledge base ships with three article types (concepts/, connections/, qa/). You can add your own directories — for example knowledge/people/, knowledge/projects/, or knowledge/tools/.
To add a custom article type:
Define the article schema in AGENTS.md
Add a new section to
AGENTS.md describing the frontmatter fields and required sections for the new type, following the same pattern as the existing Concept Articles and Connection Articles sections. The LLM reads AGENTS.md at compile time to understand what to write.