Skip to content
Agent Memory
Hook

Hooks

What cortex runs automatically, and when. A hook is a command Claude Code fires at a fixed moment, without you asking for it.

From plugin
cortex
1733 skills4 hooks1 MCP
Install
> /plugin marketplace add hjertefolger/cortex
> /plugin install cortex@cortex

Ships with cortex. Installing the plugin gets these hooks.

What fires, and when

SessionStart

Fires once when a session begins, and again after a context compaction. It is where a plugin sets up its environment, or restores state the compaction dropped.

  • node ${CLAUDE_PLUGIN_ROOT}/dist/index.js session-start

SessionEnd

  • node ${CLAUDE_PLUGIN_ROOT}/dist/index.js session-end

PreCompact

  • node ${CLAUDE_PLUGIN_ROOT}/dist/index.js pre-compact

PostToolUse

  • Matches*node ${CLAUDE_PLUGIN_ROOT}/dist/index.js post-tool
Read hooks/hooks.json

In the plugin's words

How cortex describes its own hook set.

Cortex memory hooks for automatic persistence
Ships withcortex

Persistent local memory for Claude Code. Longer sessions. Cross-session recall. Zero cloud.

Get the whole plugin
Stats
173
Stars
13
Forks
Quiet
Maintenance
TypeScript
Language
MIT
License
7mo ago
Last commit
9mo ago
Created
7d ago
Added

Repo: hjertefolger/cortex