Skip to content

fix(lifecycle): implement session end for OpenCode, Gemini CLI, and Codex#255

Open
idrojone wants to merge 1 commit intoGentleman-Programming:mainfrom
idrojone:fix/session-end-lifecycle
Open

fix(lifecycle): implement session end for OpenCode, Gemini CLI, and Codex#255
idrojone wants to merge 1 commit intoGentleman-Programming:mainfrom
idrojone:fix/session-end-lifecycle

Conversation

@idrojone
Copy link
Copy Markdown

Implements session lifecycle termination for all supported agents to prevent orphaned sessions in the cloud dashboard.

  • OpenCode: The plugin now calls POST /sessions/{id}/end directly when the session.deleted event fires.
  • Gemini CLI & Codex: Added an explicit instruction to call mem_session_end in the Memory Protocol injected into their system prompts.
  • OpenCode (graceful): Also added the mem_session_end instruction to its MEMORY_INSTRUCTIONS.

Closes #48

…odex

- Added engramFetch to POST /sessions/{id}/end in OpenCode's session.deleted event
- Added explicit mem_session_end instruction to MEMORY_INSTRUCTIONS and memoryProtocolMarkdown

Closes Gentleman-Programming#48
Copilot AI review requested due to automatic review settings April 26, 2026 20:06
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Session end lifecycle missing for OpenCode, Gemini CLI, and Codex

2 participants