#8431: Hooks: add session-graphiti memory feed
stale
## Summary
- Add session-graphiti hook to capture end-of-session conversation excerpts for Graphiti sync.
- Add conversation journal parser + dedupe state + signal detection.
- Allow hook-specific config keys (passthrough) so hooks can define options like messages.
## Tests
- pnpm vitest run --config vitest.unit.config.ts src/memory/conversation-journal.test.ts
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR adds a new bundled hook (`session-graphiti`) that records end-of-session conversation excerpts into `<workspace>/memory/conversations.jsonl` for downstream Graphiti syncing. It also introduces a conversation journal parser (`src/memory/conversation-journal.ts`) with signal detection, excerpting, and a JSON state file to dedupe repeated writes, and loosens hook entry config validation to allow hook-specific keys (via Zod `.passthrough()`).
Overall the feature is cohesive and follows existing hook plumbing patterns, but there are a couple of integration/robustness issues worth addressing (hook-key resolution consistency, config schema permissiveness, and workspace/state handling).
<h3>Confidence Score: 3/5</h3>
- This PR is reasonably safe to merge, but has a few integration and robustness concerns that could cause misconfiguration or unexpected file writes in some setups.
- The changes are additive and well-contained, with tests for transcript parsing/signal detection. Main concerns are (1) inconsistent hook-key resolution for reading hook config, (2) globally relaxing hook config validation via `.passthrough()`, and (3) workspace/state file behavior (relative default path + unbounded/lockless dedupe state) which can surprise users over time or under concurrency.
- src/hooks/loader.ts and src/hooks/bundled/session-graphiti/handler.ts (hook-key/config resolution); src/config/zod-schema.hooks.ts (schema relaxation); src/memory/conversation-journal.ts (workspace path + state management).
<!-- greptile_other_comments_section -->
<sub>(5/5) You can turn off certain types of comments like style [here](https://app.greptile.com/review/github)!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#3392: fix(hooks): remove debug console.log statements from session-memory...
by WinJayX · 2026-01-28
82.3%
#10591: feat(hooks): add session-start-memory bundled hook
by morningstar-daemon · 2026-02-06
81.9%
#13032: feat(hooks): add unified session:before_end hook event
by TGambit65 · 2026-02-10
78.9%
#8244: feat(hooks): add session:before_compact and session:after_compact i...
by kephail · 2026-02-03
78.6%
#20706: feat(hooks): add outputDir config for session-memory hook
by botBehavior · 2026-02-19
78.5%
#6858: feat(hooks): improve session-memory with LLM summarization
by alauppe · 2026-02-02
77.4%
#9782: feat(hooks): implement session:start and session:end lifecycle events
by kentaro · 2026-02-05
77.4%
#7771: Hooks: wire lifecycle events and tests
by rabsef-bicrym · 2026-02-03
77.4%
#14243: fix: fire session-memory hook on auto-resets + topic-aware memory p...
by TheDude135 · 2026-02-11
77.4%
#9914: fix(hooks): resolve bundled hook dist paths and packaging checks
by zimmra · 2026-02-05
77.1%