---
type: email
from: Hassan Abu Alhaj <notifications@github.com>
subject: Re: [openai/openai-agents-python] Add SQLAlchemy session backend for

 conversation history management (PR #1357)
received: 2026-03-05 10:13:32
date_header: Thu, 21 Aug 2025 06:29:01 -0700
priority: normal
status: awaiting_approval
uid: 28283
---

## Email Content

**From:** Hassan Abu Alhaj <notifications@github.com>
**Subject:** Re: [openai/openai-agents-python] Add SQLAlchemy session backend for

 conversation history management (PR #1357)
**Date:** Thu, 21 Aug 2025 06:29:01 -0700

### Body (preview)

@habema commented on this pull request.







> +                )

+                res = await sess.execute(subq)

+                row_id = res.scalar_one_or_none()

+                if row_id is None:

+                    return None

+                # Fetch data before deleting

+                res_data = await sess.execute(

+                    select(self._messages.c.message_data).where(self._messages.c.id == row_id)

+                )

+                row = res_data.scalar_one_or_none()

+                await sess.execute(delete(self._messages).where(self._messages.c.id == row_id))

+

+                if row is None:

+                    return None

+                try:

+                    return json.loads(row)  # type: ignore[no-any-return]



yep just fixed this. missed it the first time



-- 

Reply to this email directly or view it on GitHub:

https://github.com/openai/openai-agents-python/pull/1357#discussion_r2291069049

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



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

---

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