Agent Builder Error 400 missing reasoning items

Today I started receiving the following error when running a workflow in the “preview” and ChatKit:

Agent Builder Error code: 400 - {‘error’: {‘message’: “Item ‘msg_0xxxxxxxxxxxxxx’ of type ‘message’ was provided without its required ‘reasoning’ item: ‘rs_0xxxxxxxxxxxxx’.”, ‘type’: ‘invalid_request_error’, ‘param’: ‘input’, ‘code’: None}}

When this happens, no errors or output is reported to ChatKit. How can I avoid this?

edit: Ive narrowed this down to conversation length. It looks like the serialization is getting chopped off when the thread is trimmed to fit the max token output. This is my guess anyway after receiving this error with nothing but GPT5 models. I also tried using nothing but 4.1 models and with the same result (although the conversation did last longer).

1 Like

Anyone have any advice on this one?

Bump, any ideas on how to fix it?

It seems that disabling writing to history is helping, but I’m not sure about the root cause and what is the proper fix.

Is it a bug on OpenAI side?

It happens in the preview mode just testing the workflow. Ask enough questions and it will error out.

Bump… anyone have any ideas?