Repository navigation
Closed
Labels
bugSomething isn't workingneeds-infoWaiting on reporter for a concrete spec or reproductionstreamingSSE, WebSocket, terminal stream framestoolstool_calls, MCP, web-search / sidecar tools
Description
Client or integration
Codex App
Area
Tools / MCP / web search
Summary
I using /goal command, the output sometimes ends with
stream disconnected before completion: routed provider emitted undeclared client tool "update_plan"; only request-declared tools may be called and stream disconnected before completion: upstream stream ended without a terminal signal ([DONE] or finish_reason) — possible truncation
Reproduction
- ocx start
- start ChatGPT app
- select opencode-go/deepseek-v4-flash
- send any message, for the second error, use /goal command
Version
2.26.0
Operating system
macOS 15.7.7
Provider and model
opencode-go/deepseek-v4-flash
Logs or error output
{
"requestId": "ocx-mt2fd1a3-124",
"timestamp": 1787285032635,
"model": "deepseek-v4-flash",
"provider": "opencode-go",
"admissionKind": "loopback",
"inboundProtocol": "responses",
"conversationId": "393c1bce9269abef61f3dd19cfa00df2",
"requestedModel": "opencode-go/deepseek-v4-flash",
"requestedEffort": "high",
"effectiveEffort": "high",
"reasoningWireField": "reasoning_effort",
"reasoningWireValue": "high",
"modelSupportsServiceTier": false,
"tierOutcome": {
"wireKind": null,
"wireValue": null,
"fastOutcome": "unknown",
"confirmation": "unknown"
},
"resolvedModel": "deepseek-v4-flash",
"status": 502,
"durationMs": 178442,
"firstOutputMs": 21340,
"errorCode": "upstream_server_error",
"terminalStatus": "failed",
"closeReason": "terminal",
"upstreamError": "upstream stream ended without a terminal signal ([DONE] or finish_reason) — possible truncation",
"usageStatus": "unreported",
"attempts": [
{
"ordinal": 1,
"provider": "opencode-go",
"model": "deepseek-v4-flash",
"adapter": "openai-chat",
"status": 502,
"durationMs": 178426,
"sendCount": 1,
"recoveryKinds": [],
"usageStatus": "unreported",
"requestedEffort": "high",
"effectiveEffort": "high",
"reasoningWireField": "reasoning_effort",
"reasoningWireValue": "high",
"tierOutcome": {
"wireKind": null,
"wireValue": null,
"fastOutcome": "unknown",
"confirmation": "unknown"
},
"firstOutputMs": 21324,
"errorCode": "upstream_server_error",
"displayMetrics": {
"tokPerSecond": {
"kind": "unavailable",
"reason": "usage_missing"
},
"cost": {
"kind": "unavailable",
"reason": "usage_missing"
}
}
}
],
"transportPhase": "terminal_sse",
"terminalSource": "upstream",
"routeDecision": {
"version": 1,
"decisionId": "823b570d7167",
"createdAt": 1787285032650,
"requestedModel": "opencode-go/deepseek-v4-flash",
"routeKind": "explicit-provider",
"requirements": [],
"candidates": [
{
"provider": "opencode-go",
"model": "deepseek-v4-flash",
"eligible": true,
"exclusions": []
}
],
"selected": {
"candidateIndex": 0,
"provider": "opencode-go",
"model": "deepseek-v4-flash",
"reason": "explicit-provider-namespace"
}
},
"displayMetrics": {
"tokPerSecond": {
"kind": "unavailable",
"reason": "usage_missing"
},
"cost": {
"kind": "unavailable",
"reason": "combo_attempt_unavailable"
}
}
}
{
"requestId": "ocx-mt2epm8k-11a",
"timestamp": 1787283940052,
"model": "deepseek-v4-flash",
"provider": "opencode-go",
"admissionKind": "loopback",
"inboundProtocol": "responses",
"conversationId": "393c1bce9269abef61f3dd19cfa00df2",
"requestedModel": "opencode-go/deepseek-v4-flash",
"requestedEffort": "high",
"effectiveEffort": "high",
"reasoningWireField": "reasoning_effort",
"reasoningWireValue": "high",
"modelSupportsServiceTier": false,
"tierOutcome": {
"wireKind": null,
"wireValue": null,
"fastOutcome": "unknown",
"confirmation": "unknown"
},
"resolvedModel": "deepseek-v4-flash",
"status": 502,
"durationMs": 163873,
"firstOutputMs": 2296,
"errorCode": "upstream_server_error",
"terminalStatus": "failed",
"closeReason": "terminal",
"upstreamError": "routed provider emitted undeclared client tool \"update_plan\"; only request-declared tools may be called",
"usageStatus": "unreported",
"attempts": [
{
"ordinal": 1,
"provider": "opencode-go",
"model": "deepseek-v4-flash",
"adapter": "openai-chat",
"status": 502,
"durationMs": 163857,
"sendCount": 1,
"recoveryKinds": [],
"usageStatus": "unreported",
"requestedEffort": "high",
"effectiveEffort": "high",
"reasoningWireField": "reasoning_effort",
"reasoningWireValue": "high",
"tierOutcome": {
"wireKind": null,
"wireValue": null,
"fastOutcome": "unknown",
"confirmation": "unknown"
},
"firstOutputMs": 2280,
"errorCode": "upstream_server_error",
"displayMetrics": {
"tokPerSecond": {
"kind": "unavailable",
"reason": "usage_missing"
},
"cost": {
"kind": "unavailable",
"reason": "usage_missing"
}
}
}
],
"transportPhase": "terminal_sse",
"terminalSource": "upstream",
"routeDecision": {
"version": 1,
"decisionId": "76324fa5a846",
"createdAt": 1787283940065,
"requestedModel": "opencode-go/deepseek-v4-flash",
"routeKind": "explicit-provider",
"requirements": [],
"candidates": [
{
"provider": "opencode-go",
"model": "deepseek-v4-flash",
"eligible": true,
"exclusions": []
}
],
"selected": {
"candidateIndex": 0,
"provider": "opencode-go",
"model": "deepseek-v4-flash",
"reason": "explicit-provider-namespace"
}
},
"displayMetrics": {
"tokPerSecond": {
"kind": "unavailable",
"reason": "usage_missing"
},
"cost": {
"kind": "unavailable",
"reason": "combo_attempt_unavailable"
}
}
}Screenshots and supporting files
No response
Redacted configuration
config.toml
model_provider = "custom"
openai_base_url = ""
model_catalog_json = "~/.codex/opencodex-catalog.json"
model = "opencode-go/deepseek-v4-flash"
model_reasoning_effort = "high"
[model_providers.custom]
name = "custom"
base_url = "http://localhost:10100/v1"Checks
- I searched existing issues and documentation.
- I removed secrets, tokens, account details, request credentials, and personal data.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingneeds-infoWaiting on reporter for a concrete spec or reproductionstreamingSSE, WebSocket, terminal stream framestoolstool_calls, MCP, web-search / sidecar tools
Activity
Ingwannu commentedon Aug 21, 2026
I checked this against current
dev. The report contains two separate failures, and I do not want to weaken the undeclared-tool guard to hide either one.routed provider emitted undeclared client tool "update_plan"is the intentional fail-closed boundary. For a routed provider, OCX may relay only client tools authorized by that turn's request/tool-choice. Executing or replaying an undeclaredupdate_plancall would be incorrect and unsafe. The current guard and bridge regressions pass (93 focused tests).upstream stream ended without a terminal signalis emitted by the OpenAI-compatible Chat adapter when opencode-go closes after partial output without[DONE]or a terminalfinish_reason. That is a distinct provider/stream-contract failure; inventing a successful terminal response could commit truncated tool state.What is still unknown is why
deepseek-v4-flashproducedupdate_plan: either the Codex/goalturn did not authorize it, or the adapter/provider omitted or ignored an authorized declaration. The request log does not include the redacted outbound tool catalog, so the supplied logs cannot distinguish those cases.Please retest on the current stable release,
2.28.0, and attach:/goalturn with the same model succeeds;tool_choiceand the tool names/types sent upstream (no prompts, arguments, tokens, headers, account IDs, or URLs containing credentials).I am marking this
needs-infoand keeping it open. Ifupdate_planis present and authorized in that outbound catalog but OCX still rejects the returned call, that is an OCX catalog/alias bug and I will add the focused/goalregression. If it is absent, the guard is behaving correctly and the remaining fix belongs in provider compatibility/guidance rather than execution authorization.lidge-jun commentedon Aug 21, 2026
Both symptoms addressed on dev (will ship in 2.28.0), via #2271:\n\n1. The undeclared update_plan drop was fixed earlier by the Codex 0.147 functions-namespace flattening (5f2b939) and is now locked by a real-server regression: update_plan stays declared through the Responses->Chat translation on the opencode-go lane.\n2. The terminal-signal drop reproduced on current dev: opencode-go can close the stream after a complete tool-call delta without finish_reason or [DONE]. The chat adapter now accepts that EOF for opencode-go only when every pending call carries a name and complete JSON-object arguments — genuinely truncated calls still fail loudly.\n\nIf you still see either error on 2.28.0+, please attach the Logs & Debug entry for the failing request.