---
type: email
from: "chatgpt-codex-connector[bot]" <notifications@github.com>
subject: Re: [openai/openai-agents-python] fix(chatcmpl): preserve all LiteLLM

 thinking-block signatures in converter (PR #1779)
received: 2026-03-06 07:40:18
date_header: Sun, 21 Sep 2025 22:44:48 -0700
priority: normal
status: awaiting_approval
uid: 30948
---

## Email Content

**From:** "chatgpt-codex-connector[bot]" <notifications@github.com>
**Subject:** Re: [openai/openai-agents-python] fix(chatcmpl): preserve all LiteLLM

 thinking-block signatures in converter (PR #1779)
**Date:** Sun, 21 Sep 2025 22:44:48 -0700

### Body (preview)

@chatgpt-codex-connector[bot] commented on this pull request.



Codex Review: Here are some suggestions.



<details> <summary>About Codex in GitHub</summary>



[Your team has set up Codex to review pull requests in this repo](http://chatgpt.com/codex/settings/general). Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.



Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

</details>



>                                  "type": "thinking",

                                 "thinking": content_item.get("text", ""),

                             }

-                            # Add signature if available

-                            if signature:

-                                thinking_block["signature"] = signature

+                            # Add signatures if available

+                            if signatures:

+                                thinking_block["signature"] = signatures.pop(0)



**[P1] Preserve signature alignment when some thinking blocks lack signatures**



`message_to_output_items` now collects only the signatures that are present and stores them as a newline‑joined string, but `items_to_messages` reconstructs thinking blocks by popping from that list for every reasoning block in order. If a response contains multiple thinking blocks where some early blocks do not have signatures, this logic shifts the later signatures onto earlier blocks and drops any trailing ones (e.g., blocks `[no sig, sigA, sigB]` become `[sigA, sigB, none]`). This produces incorrect signature/block pairing and will break downstream verification whenever not all blocks carry a signature. Consider storing signature placeholders (e.g., `None`) for blocks without signatures or associating signatures with their block index before reconstruction.



Use

---

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