← Back to PRs

#8431: Hooks: add session-graphiti memory feed

by JorgeAlan open 2026-02-04 01:34 View on GitHub →
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