Claude Note integrates with Claude Code through hooks. This document explains how to configure them.
Claude Code fires hooks at key moments:
- PostToolUse: After any tool is used
- UserPromptSubmit: When user sends a message
- Stop: When session ends
Claude Note listens to these events to track sessions and trigger synthesis.
Edit ~/.claude/settings.json:
{
"hooks": {
"PostToolUse": [
{
"hooks": [
{ "type": "command", "command": "claude-note enqueue", "timeout": 5000 }
]
}
],
"UserPromptSubmit": [
{
"hooks": [
{ "type": "command", "command": "claude-note enqueue", "timeout": 5000 }
]
}
],
"Stop": [
{
"hooks": [
{ "type": "command", "command": "claude-note enqueue", "timeout": 5000 }
]
}
]
}
}Create .claude/settings.json in your project root with the same content.
Fired after every tool use (file read, edit, bash command, etc.).
Used for:
- Keeping session state fresh
- Detecting activity patterns
Fired when the user sends a message.
Used for:
- Question detection (adds to open questions tracker)
- Session activity tracking
Fired when the session ends (user exits or session times out).
Used for:
- Triggering synthesis
- Finalizing session log
Claude Code provides these variables to hooks:
| Variable | Description |
|---|---|
CLAUDE_SESSION_ID |
Unique session identifier |
CLAUDE_WORKING_DIR |
Current working directory |
- Start a Claude Code session
- Check the queue:
claude-note status
- You should see pending events
-
Verify settings.json location and syntax:
cat ~/.claude/settings.json | jq .
-
Check if claude-note is in PATH:
which claude-note
-
Test hook manually:
claude-note enqueue test "test-session-id"
-
Check if worker is running:
# macOS launchctl list | grep claude-note # Linux systemctl --user status claude-note
-
Check worker logs:
tail -f /path/to/vault/.claude-note/logs/worker-*.log
-
Verify Claude CLI is installed:
which claude
-
Check if you're authenticated:
claude --version
-
Check synthesis mode in config:
cat ~/.config/claude-note/config.toml
If you only want session logging (no synthesis), you can use just the Stop hook:
{
"hooks": {
"Stop": [
{
"hooks": [
{ "type": "command", "command": "claude-note enqueue", "timeout": 5000 }
]
}
]
}
}And set mode to "log":
[synthesis]
mode = "log"To only capture sessions in specific directories, add a matcher regex:
{
"hooks": {
"Stop": [
{
"matcher": "/Users/you/work/.*",
"hooks": [
{ "type": "command", "command": "claude-note enqueue", "timeout": 5000 }
]
}
]
}
}The matcher is a regex against the working directory.