revert: remove Codex Stop hook session-end
Summary
- Reverts #495 because Codex Stop can fire before the overall conversation is truly finished.
- Restores the Codex Stop hook to summarize-only behavior.
- Removes the test that required session-end.mjs to run from Stop.
Why
After testing in Codex, adding session-end.mjs to Stop marks sessions completed too early while later observations can still arrive. A separate SessionEnd hook is not surfaced by Codex /hooks for this plugin, so the safe behavior is to avoid ending sessions from Stop.
Verification
- npx vitest run test/codex-plugin.test.ts
Refs #493
Summary by CodeRabbit
- Chores
- Simplified Stop hook by removing session-end command execution
@Rex57 is attempting to deploy a commit to the rohitg00's projects Team on Vercel.
A member of the Team first needs to authorize it.
No actionable comments were generated in the recent review. π
βΉοΈ Recent review info
βοΈ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 494bd4d4-720d-49d4-a5e5-6c1b3ca47d44
π₯ Commits
Reviewing files that changed from the base of the PR and between caa9f5223e194d5588b3cf2b61469a6cbc56b7de and 8b5312ad6dc47c3dd70e8f293d80a06cb7fa6c91.
π Files selected for processing (2)
plugin/hooks/hooks.codex.jsontest/codex-plugin.test.ts
π€ Files with no reviewable changes (2)
- plugin/hooks/hooks.codex.json
- test/codex-plugin.test.ts
π Walkthrough
Walkthrough
This PR removes the scripts/session-end.mjs command from the Stop hook configuration and deletes the test case that verified both stop and session-end commands were present. The Stop hook now only executes scripts/stop.mjs.
Changes
Stop Hook Command Simplification
| Layer / File(s) | Summary |
|---|---|
Stop hook and test update plugin/hooks/hooks.codex.json, test/codex-plugin.test.ts |
The Stop hook removes the session-end.mjs command, and the test validating that command presence is deleted. |
Estimated code review effort
π― 1 (Trivial) | β±οΈ ~3 minutes
Possibly related PRs
- rohitg00/agentmemory#495: This PR directly reverses the changes from
#495, which addedscripts/session-end.mjsto the Stop hook and asserted it in the test.
Poem
π° The session says goodbye, goodbye, No end command needed now, oh my! Simpler hooks hop with glee, Stop script stands alone, you see!
π₯ Pre-merge checks | β 5
β Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | β Passed | Check skipped - CodeRabbitβs high-level summary is enabled. |
| Title check | β Passed | The title 'revert: remove Codex Stop hook session-end' directly and clearly summarizes the main change: reverting a previous change that added session-end functionality to the Codex Stop hook. |
| Docstring Coverage | β Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| Linked Issues check | β Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | β Passed | Check skipped because no linked issues were found for this pull request. |
βοΈ Tip: You can configure your own custom pre-merge checks in the settings.
β¨ Finishing Touches
π§ͺ Generate unit tests (beta)
- [ ] Create PR with unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
Merged + shipping in v0.9.20 β https://github.com/rohitg00/agentmemory
Thanks @Rex57 for both the original fix and the field-tested revert. Re-opened #493 to track the SessionEnd-shaped solution. #502 follow-up on graph extraction also in the queue.