Skip to content

SDK leaks internal reasoning into client-facing response (adds response_reasoning: inside JSON output) #844

@mubashirdev

Description

@mubashirdev

The OpenAI Agents TypeScript SDK is returning internal reasoning inside the client-facing response field.

Instead of keeping reasoning separate, the SDK appends text like response_reasoning: directly into the response string, which is shown to end users.

Expected
• response contains only user-facing content.
• Internal reasoning is either:
• excluded, or
• returned in a separate non-user-facing field.

Actual
{ "response": "User-facing message...\nresponse_reasoning:\ninternal reasoning text" }

Impact
• Leaks internal/system reasoning to end users
• Breaks structured/JSON responses
• Forces client-side sanitization

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions