| name | notion-session-sync |
| description | Live Notion session log (L4b) — create, incremental updates during work, finalize on CLOSE. Works on any Cursor project workspace. |
On-demand loading: Read when Notion L4b sync is triggered (hooks, stop loop, or user request).
When to use
| Mode | Trigger |
|---|
| create | sessionStart step 4, or first [notion-live] after code edit, or stop finalize when no page exists |
| incremental | [notion-live] afterFileEdit gate, preCompact hook |
| finalize | stop hook loop_count=1 |
| compact | alias for incremental during preCompact |
Works for any project — project slug from primary workspace_roots (excludes ~/.cursor and ks-cursor-orchestrator when another root is open).
Workflow
- Load config:
~/.cursor/hooks/config/notion-session-sync.json (enabled, live_sync, parent_page_id, project_parents).
- Resolve project slug + Notion parent page.
- Load/update state:
~/.cursor/hooks/logs/notion-sessions/<conversation_id>.json.
- Execute mode — see
references/modes.md for create/incremental/finalize payloads. All Notion MCP calls use server user-notion (GetMcpTools / CallMcpTool).
Guardrails
- One live page per
conversation_id
- No secrets in Notion body
- Project tag
[SLUG] in title
- On MCP failure: note briefly; do not block session
Trivial session gate
Skip all Notion sync only when: skip_trivial_sessions: true AND zero code edits AND single-question Q&A AND no decisions/artifacts. First code edit always triggers create.
References
references/modes.md — MCP payloads and finalize structure