Skip to content

“Unknown parameter: 'input[1].status'” when using GPT-5 with OpenAIConversationsSession #1911

@zkula

Description

@zkula

Bug Summary

When using the gpt-5 model with the OpenAI Agents SDK (openai-agents==0.3.3) and storing conversation sessions with the Conversations API, a follow-up message in the same conversation fails with a 400 error:
{'error': {'message': "Unknown parameter: 'input[1].status'.", 'type': 'invalid_request_error', 'param': 'input[1].status', 'code': 'unknown_parameter'}}
This occurs consistently on any second turn (follow-up message) within a conversation session.

Debug information

  • Agents SDK version: v0.3.3
  • openai version: 1.109.1
  • Python version: 3.11.11
  • OS: MacOS Sequoia 15.6.1
  • Model: gpt-5

Repro steps

Script to reproduce issue:

"""
Reproduce GPT-5 'Unknown parameter: input[n].status' error when using OpenAIConversationsSession.

Requires:
    pip install openai==1.109.1 openai-agents==0.3.3
Set your key in OPENAI_API_KEY.
"""

import asyncio
from openai import OpenAI
from agents import Agent, Runner, OpenAIConversationsSession, ModelSettings
from pydantic import BaseModel, Field
import os

# Ensure OPENAI_API_KEY is set in environment (run `export OPENAI_API_KEY=your_key` in terminal)
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
if not OPENAI_API_KEY:
    raise ValueError("OPENAI_API_KEY environment variable must be set")


class AgentOutput(BaseModel):
    response: str = Field(description="Agent response text")


async def run_repro():
    client = OpenAI(api_key=OPENAI_API_KEY)
    # --- Create a conversation (this is where the issue happens) ---
    conv = client.conversations.create()
    conversation_id = conv.id

    # --- Create the agent ---
    agent = Agent(
        name="ReproAgent",
        instructions="You are a helpful assistant.",
        model="gpt-5",  # This triggers the 400
        output_type=AgentOutput,
    )

    # --- First message: works fine ---
    session = OpenAIConversationsSession(conversation_id=conversation_id)
    print("Running first turn...")
    result = Runner.run_streamed(agent, input="Hello!", session=session)
    async for event in result.stream_events():
        pass  # consume stream

    print("First turn complete.")

    # --- Second message: reproduces 'input[n].status' error ---
    print("Running follow-up turn (expecting 400 error)...")
    try:
        result2 = Runner.run_streamed(agent, input="Tell me more.", session=session)
        async for event in result2.stream_events():
            pass
    except Exception as e:
        print(f"\n❌ ERROR: {e}\n")


if __name__ == "__main__":
    asyncio.run(run_repro())

Actual Output

Running first turn...
First turn complete.
Running follow-up turn (expecting 400 error)...
Error streaming response: Error code: 400 - {'error': {'message': "Unknown parameter: 'input[1].status'.", 'type': 'invalid_request_error', 'param': 'input[1].status', 'code': 'unknown_parameter'}}

❌ ERROR: Error code: 400 - {'error': {'message': "Unknown parameter: 'input[1].status'.", 'type': 'invalid_request_error', 'param': 'input[1].status', 'code': 'unknown_parameter'}}

Expected behavior

The follow-up message should continue the conversation seamlessly (like GPT-4 agents), not trigger an invalid parameter error.

Observations

  • This issue only starts happening when using a gpt-5 model. I did not experience any issues while using the 'gpt-4.1' model.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions