You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Message has tool role, but there was no previous assistant message with a tool call! Message has tool role, but there was no previous assistant message with a tool call! #8816
Linux 7f3e348192e9 5.4.278-1.el7.elrepo.x86_64 #1 SMP Sun Jun 16 15:37:11 EDT 2024 x86_64 x86_64 x86_64 GNU/Linux
What issue are you seeing?
What steps can reproduce the bug?
tool_call or shell command
What is the expected behavior?
{"error":{"message":"Message has tool role, but there was no previous assistant message with a tool call! Message has tool role, but there was no previous assistant message with a tool
call!","type":"BadRequestError","param":null,"code":400}}
changed the title [-]"Message has tool role, but there was no previous assistant message with a tool call! Message has tool role, but there was no previous assistant message with a tool call![/-][+]Message has tool role, but there was no previous assistant message with a tool call! Message has tool role, but there was no previous assistant message with a tool call![/+]on Jan 7, 2026
This is likely because you're using the "chat" wire API. We've announced that we are removing support for this older wire API at the end of this month, so it's unlikely that we will fix any bugs with it between now and then. Please switch to the "responses" wire API.
If this diagnosis isn't correct, let me know and I'll reopen the issue.
Activity
[-]"Message has tool role, but there was no previous assistant message with a tool call! Message has tool role, but there was no previous assistant message with a tool call![/-][+]Message has tool role, but there was no previous assistant message with a tool call! Message has tool role, but there was no previous assistant message with a tool call![/+]etraut-openai commentedon Jan 7, 2026
This is likely because you're using the "chat" wire API. We've announced that we are removing support for this older wire API at the end of this month, so it's unlikely that we will fix any bugs with it between now and then. Please switch to the "responses" wire API.
If this diagnosis isn't correct, let me know and I'll reopen the issue.