Repository navigation
Description
Client or integration
Codex App; also reproduced with a direct HTTP client.
Provider or upstream service
Devin / Cognition (devin adapter, OAuth).
OpenCodex version
@bitkyc08/opencodex 2.98.0 on Windows 11.
Endpoint or capability
POST /v1/responses: function-tool parameter schema translation to Devin's GetChatMessage.
Current behaviour
A short request with a function tool whose parameter schema has a root oneOf is rejected on devin/claude-opus-5-5 with invalid_argument, before any text or tool call is returned. In non-streaming mode, the HTTP response is 200 but the Responses object has status: "failed"; clients must inspect the response status. A Codex App turn also failed with the same error and retried five times.
Expected behaviour
A valid Codex/MCP tool definition should remain usable when routed to a Devin Claude model, including tool argument validation. If a schema cannot be translated safely, report a clear compatibility error instead of an opaque upstream failure.
Minimal redacted request or reproduction
With an already configured and authenticated Devin provider, POST this synthetic JSON to the local /v1/responses endpoint:
{
"model": "devin/claude-opus-5-5",
"input": "Call probe with a set to ok.",
"max_output_tokens": 64,
"stream": false,
"store": false,
"tools": [
{
"type": "function",
"name": "probe",
"description": "Probe tool.",
"parameters": {
"oneOf": [
{
"type": "object",
"properties": { "a": { "type": "string" } },
"required": ["a"],
"additionalProperties": false
},
{
"type": "object",
"properties": { "b": { "type": "string" } },
"required": ["b"],
"additionalProperties": false
}
]
}
}
]
}Observed controls:
devin/claude-opus-5-5, short prompt without tools, includingreasoning.effort: high: completed withOK.- The synthetic
oneOfprobe above: Claude returnedstatus: failedwithinvalid_argument. With the same probe schema ondevin/swe-2andreasoning.effort: high, the response completed and produced aprobecall with{"a":"ok"}. - In a separate A/B using the
mcp__cua_repl.jsdefinition generated by the same local Codex runtime, a short Claude request athighfailed with the tool's rootoneOfpresent and completed withOKwhen only that root keyword was removed. This checked request acceptance, not execution of the tool.
Actual response or error
response.status: failed
error.type: invalid_request_error
error.code: invalid_argument
Devin cloud error invalid_argument: Cognition chat failed (invalid_argument)
The original Codex App turn was streamed; the reduced HTTP probes above were non-streaming. The original Desktop request's complete tool list was not retained, so the particular tool responsible for that historical failure is not confirmed.
Upstream documentation
No public specification for Cognition's unofficial GetChatMessage request format was located. The expected behaviour is based on the Codex/MCP tool contract and the controlled request comparisons above.
Suggested mapping or implementation notes
In 2.98.0, the Devin tool encoder calls normalizeDevinToolParameters, which rewrites Gemini type arrays but returns other models' parameters unchanged. buildTools adds an object root when necessary, leaving the root oneOf in the synthetic example.
PR #8163 addresses root compositions for Claude via openai-chat, but the Devin cloud-direct adapter uses a separate path. Consider a Claude-specific Devin normalization, preserving or validating the original constraints when converting. Simply deleting a root oneOf weakens required/alternative constraints; untranslatable cases need an explicit safe outcome. Regression coverage should include the failing schema, argument validation, and an unchanged SWE-2 path. Only root oneOf was tested in this OCX investigation; anyOf and allOf remain unverified here.
Additional context and attachments
Magpie issue #1196 describes a similar Cognition/Claude root-composition issue in a different gateway. No credentials, account identifiers, local paths, trace IDs, private conversation content, or raw logs are included here.
Checks
- I searched existing provider and compatibility issues.
- The request and response were redacted.
- The expected behaviour is based on a concrete client requirement.
Activity
Ingwannu commentedon Nov 8, 2026
Confirmed in code on
dev(f8dfc2f). The Devin Cognition encoder has no root-composition handling:src/adapters/devin/cloud-direct/chat.ts:687-694(encodeToolDef) sends the parameters throughnormalizeDevinToolParameters.src/adapters/devin/cloud-direct/tool-schema.ts:83-85rewrites schemas only for Gemini UIDs. Claude UIDs get the rootoneOfunchanged.src/responses/parser-tools.ts:45-47only addstype: "object"when it is missing.PR #8163 (merged) flattens Claude root compositions only on the openai-chat path. The Devin path is separate and was not covered.
We have not reproduced this against Devin ourselves, so your probes are the evidence. Untested:
anyOfandallOfroots.Possible fix shape (not implemented): for Claude UIDs, apply the same bounded root flattening used by #8163 before
encodeToolDefserializes the schema. Deleting the rootoneOfwould drop the alternative constraints, so it should not be the approach. A schema that cannot be translated safely should return a local 400 with a clear message instead of an opaqueinvalid_argument.Could you confirm whether an
anyOfroot fails the same way on Claude?fix(devin): flatten root tool-schema compositions for Claude uids (li…