Client or integration
Codex App
Provider or upstream service
Ollama Cloud (ollama-cloud, ollama-native adapter)
OpenCodex version
2.39.0
Endpoint or capability
POST /v1/responses — delegated task startup and history conversion
Current behaviour
An Ollama Cloud model fails before producing its first response when it is assigned to a delegated child task in Codex App.
The same model works when a task is created normally and begins with a regular user message. The provider connection is healthy, model discovery succeeds, and a normal minimal request returns HTTP 200.
The failure was reproduced with:
ollama-cloud/deepseek-v4-flash:0731
ollama-cloud/glm-5.3-flash
Minimal redacted request or reproduction
- Connect Codex App to a healthy OpenCodex instance.
- Confirm that Ollama Cloud model discovery and a normal task both work.
- From an existing Codex App task, start a delegated child task and assign it an Ollama Cloud model.
- Let the child task begin.
- The child fails before any model output is produced.
- Start a separate task normally with the same model. It reaches Ollama Cloud successfully.
Actual response or error
Codex App reports:
unexpected status 502 Bad Gateway: Provider unreachable:
ollama-native orphan tool result <missing-id>
The delegated task history begins with a result-like item that has no call_id and no preceding matching call. During local history conversion, ollama-native classifies it as an orphan result and aborts the request. Diagnostics show that the failing request is rejected before an upstream request is sent.
There is also an error-mapping difference:
- Without web search, the same history condition returns HTTP 400
invalid_request_error.
- With web search enabled, it returns HTTP 502
Provider unreachable.
Expected behaviour
Delegated child tasks should start normally on Ollama Cloud models. The client bootstrap history should be normalized before native Ollama tool-history validation.
A local history-validation failure should not be reported as an unreachable upstream provider.
Additional context and attachments
Codex CLI: 0.144.6
OS: Windows 11, build 26200
Control results:
Ollama Cloud provider test: connected, 19 models discovered
Normal Ollama Cloud request: HTTP 200, upstream request sent
Delegated-task history failure: rejected locally, no upstream request sent
Upstream documentation
Client or integration
Codex App
Provider or upstream service
Ollama Cloud (
ollama-cloud,ollama-nativeadapter)OpenCodex version
2.39.0
Endpoint or capability
POST /v1/responses— delegated task startup and history conversionCurrent behaviour
An Ollama Cloud model fails before producing its first response when it is assigned to a delegated child task in Codex App.
The same model works when a task is created normally and begins with a regular user message. The provider connection is healthy, model discovery succeeds, and a normal minimal request returns HTTP 200.
The failure was reproduced with:
ollama-cloud/deepseek-v4-flash:0731ollama-cloud/glm-5.3-flashMinimal redacted request or reproduction
Actual response or error
Codex App reports:
The delegated task history begins with a result-like item that has no
call_idand no preceding matching call. During local history conversion,ollama-nativeclassifies it as an orphan result and aborts the request. Diagnostics show that the failing request is rejected before an upstream request is sent.There is also an error-mapping difference:
invalid_request_error.Provider unreachable.Expected behaviour
Delegated child tasks should start normally on Ollama Cloud models. The client bootstrap history should be normalized before native Ollama tool-history validation.
A local history-validation failure should not be reported as an unreachable upstream provider.
Additional context and attachments
Control results:
Upstream documentation