-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
I'm using OpenAI Responses API and the remote GitHub MCP server with PAT authentication. Starting a few days ago I noticed that the first interaction works fine, but then every subsequent tool call fails. This used to work fine.
Some users report setting stateless_http=True
in the MCP server itself seems to fix this issue (Source).
"name": "list_pull_requests",
"server_label": "github",
"type": "mcp_call",
"error": {
"type": "mcp_protocol_error",
"code": 32600,
"message": "Session terminated"
},
Affected version
latest
Steps to reproduce the behavior
response = await llm.responses.create(
model="gpt-4.1",
tools=[
Mcp(
server_label="github",
server_url="https://api.githubcopilot.com/mcp/",
type="mcp",
headers={
"Authorization": f"Bearer {GITHUB_PAT}",
},
require_approval="never",
)
],
input="what is my github username? how many issues do i have open?"
)
print(response.model_dump_json(indent=2))
Expected vs actual behavior
The session should persist for multiple tool calls.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working