---
type: email
from: Kazuhiro Sera <notifications@github.com>
subject: Re: [openai/openai-agents-python] fix: Add close() method to

 SQLAlchemySession for proper engine disposal (PR #1960)
received: 2026-03-06 08:11:23
date_header: Tue, 21 Oct 2025 01:11:14 -0700
priority: normal
status: awaiting_approval
uid: 33258
---

## Email Content

**From:** Kazuhiro Sera <notifications@github.com>
**Subject:** Re: [openai/openai-agents-python] fix: Add close() method to

 SQLAlchemySession for proper engine disposal (PR #1960)
**Date:** Tue, 21 Oct 2025 01:11:14 -0700

### Body (preview)

@seratch requested changes on this pull request.







> @@ -319,3 +322,29 @@ async def clear_session(self) -> None:

                 await sess.execute(

                     delete(self._sessions).where(self._sessions.c.session_id == self.session_id)

                 )

+

+    @property

+    def engine(self) -> AsyncEngine:

+        """Access the underlying SQLAlchemy AsyncEngine.

+

+        This property provides direct access to the engine for advanced use cases,

+        such as checking connection pool status, configuring engine settings,

+        or manually disposing the engine when needed.

+

+        Returns:

+            AsyncEngine: The SQLAlchemy async engine instance.

+        """

+        return self._engine

+

+    async def close(self) -> None:



I'd like to remove this general method because the sessions store interface does not declare this method



-- 

Reply to this email directly or view it on GitHub:

https://github.com/openai/openai-agents-python/pull/1960#pullrequestreview-3359308360

You are receiving this because you are subscribed to this thread.



Message ID: <openai/openai-agents-python/pull/1960/review/3359308360@github.com>

---

## Suggested Actions
- [ ] Reply
- [ ] Archive
- [ ] Escalate
