Skip to content

Posit Assistant Responses tool continuation fails for Luna after tool calls #2648

Description

@Liang-Psych

Client or integration

Codex CLI

Provider or upstream service

ChatGPT Codex forward / Posit Assistant

OpenCodex version

2.32.1

Endpoint or capability

/v1/responses, Responses tool continuation, prompt caching, reasoning replay

Current behaviour

The first OpenAI Responses request from Posit Assistant succeeds and returns tool calls. When the tool results are sent back in the next continuation request, Posit Assistant reports Error making request and Turn failed. OpenCodex returns HTTP 502 upstream_server_error for the gpt-5.6-luna request.

Expected behaviour

The OpenAI Responses compatibility layer should accept the Posit Assistant continuation request, remove or normalize client-only prompt cache markers, handle unpersisted item references when store=false, preserve function call_id pairing, and return a valid Responses SSE stream while preserving reasoning.effort.

Minimal redacted request or reproduction

1. Start OpenCodex 2.32.1 on the macOS host with: ocx start --port 7861
2. Connect Positron 2026.08.2 to a remote Linux container using Remote-SSH. Posit Assistant runs in the remote container and port 7861 is forwarded to the macOS host.
3. Configure Posit Assistant to use gpt-5.6-luna through the openai-responses protocol at http://127.0.0.1:7861/v1.
4. Submit a task that requires tools, for example: list the files in the workspace and find the relevant R script.
5. The first Responses request succeeds and returns tool calls.
6. After tool results are returned, the next continuation request fails.

The failing continuation is a store=false Responses request containing client-side prompt_cache_breakpoint markers in nested input content and an item_reference to a previous reasoning item. A sanitized copy of the failing request can be replayed through POST /v1/responses.

Actual response or error

HTTP 502
errorCode: upstream_server_error
inboundProtocol: responses
requestedModel: gpt-5.6-luna

Observed upstream errors while replaying the continuation include:
- prompt_cache_breakpoint is not supported on this model
- Item with id 'rs_...' not found. Items are not persisted when store is set to false.
- input[1].id missing after incompatible item-id cleanup

After removing the cache-breakpoint markers recursively and removing the unpersisted item_reference while preserving tool call_id pairing, the exact replay returns HTTP 200 with a complete Responses SSE stream.

Upstream documentation

https://platform.openai.com/docs/api-reference/responses

Suggested mapping or implementation notes

The proxy should apply this normalization in the canonical OpenAI Responses forward sanitization pipeline. The transform should be narrow: remove prompt_cache_breakpoint recursively and drop item_reference only when store=false, while preserving reasoning.effort and function call_id pairing.

Additional context and attachments

Related issue: #2645. The original issue was automatically closed because its structured Reproduction field was empty. This replacement uses the Provider or API compatibility form and fills all required fields.

Checks

  • I searched existing provider and compatibility issues.
  • The request and response were redacted.
  • The expected behaviour is based on an upstream specification or a concrete client requirement.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    landed-via-maintainerOriginal PR closed after landing via a maintainer merge trainproviderProvider adapters, OpenAI-compat presets, upstream API quirksprovider-compatibilityProvider compatibility reportsstreamingSSE, WebSocket, terminal stream framestoolstool_calls, MCP, web-search / sidecar tools

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions