You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Codex plugin sessions can stay active in the AgentMemory viewer after Codex stops.
Environment
OS: Windows
Node: v24.14.1
agentmemory: 0.9.18
Agent: Codex CLI plugin installed through /plugin
Repro
Start agentmemory.
Start a Codex session with the AgentMemory plugin enabled.
End the Codex session.
Open the AgentMemory viewer.
Expected
The session should be marked ended automatically.
Actual
The session can remain active until manually ending it in the viewer.
Root cause
plugin/hooks/hooks.codex.json wires Codex Stop to plugin/scripts/stop.mjs. That script only calls /agentmemory/summarize; it does not call /agentmemory/session/end.
plugin/scripts/session-end.mjs already has session-end behavior, but Codex does not expose/use a separate SessionEnd hook in hooks.codex.json.
Suggested fix
Have the Stop hook end the session after best-effort summarize. This keeps existing summary behavior while closing the viewer session lifecycle for Codex.
Related: #308 covers broader abandoned-session recovery. This issue is the narrower Codex Stop-hook lifecycle path.
Re-opening — the Stop-hook chain shipped in v0.9.19 (#495) was reverted via #501 because Codex Stop fires before the conversation actually finishes, marking sessions completed too early. Separate SessionEnd surface is what we want here. Tracking for v0.9.20+.
Activity
rohitg00 commentedon May 18, 2026
Re-opening — the Stop-hook chain shipped in v0.9.19 (#495) was reverted via #501 because Codex Stop fires before the conversation actually finishes, marking sessions completed too early. Separate SessionEnd surface is what we want here. Tracking for v0.9.20+.
chore(release): v0.9.20 — hotfix Codex Stop revert (#501)
fix: resolve 6 open issues — graph extraction, buffer pool, tool coun…
fix: resolve 15 open issues — buffer pool, graph extraction, sessions…
fix(hooks): stop also closes session for Codex (closes #493) (#579)
chore(release): v0.9.20 — hotfix Codex Stop revert (rohitg00#501)
fix(hooks): stop also closes session for Codex (closes rohitg00#493) (r…