Repository navigation
Description
Note
Written by DeepSeek V4.1 Flash on behalf of @seankoji
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- Put a non-Codex CLI at the Codex binary path. A shell wrapper is enough: it prints
noop v1.2.3for--versionand its multi-line help text (to stdout) forapp-server. - Set it in T3 Code → Settings → Providers → Codex → Binary path (or
providerInstances.codex.config.binaryPathinsettings.json). - Open Settings → Providers, or call the server's provider capabilities.
Expected behavior
The Codex provider should say the configured binary is not Codex and name the path (or at least say it did not speak the app-server protocol), so the misconfiguration is obvious.
Actual behavior
Codex keeps its cached model list but gains this constraint:
Codex app-server provider probe failed: Codex App Server protocol operation 'decode-wire-message' failed..
The message names neither the binary nor the cause, and the version probe adopts the other CLI's version: versionAdvisory.currentVersion became 2.3.2 while latestVersion was 0.171.0, so the UI treats a non-Codex binary as an outdated-but-known Codex.
Correcting the binary path clears the constraint on the next probe with no restart, which confirms the binary was the only variable.
Why it happens
withCodexAppServerClientspawns<binaryPath> app-server -c thread_unload_delay_secs=0(apps/server/src/provider/CodexProvider.ts:650,apps/server/src/provider/codexLaunchArgs.ts:16).- The unrelated CLI prints plain text to stdout, and
decodeWireMessageparses every stdout line as JSON (packages/effect-codex-app-server/src/protocol.ts:129). Effect fails withExpected a valid JSON string, whichCodexProvider.ts:1098then wraps asCodex app-server provider probe failed: ${error.message}.— the trailing full stop is why it readsfailed... probeCodexCliVersionparses--versionwithCODEX_CLI_VERSION_PATTERN(CodexProvider.ts:149), which is(?:^|\s)v?(\d+\.\d+\.\d+...)and happily matchesnoop v1.2.3.
Proposed fix
- Use the strict shape already applied to local installs,
/^codex-cli (\d+\.\d+\.\d+)$/(apps/server/src/provider/CodexInstallation.ts:541), for the configured binary path too. When it does not match, report "not Codex" with the path instead of adopting the value. - Include the binary path, and the first rejected stdout line (truncated), in the probe failure message; or map
decode-wire-messagefailures to "the configured binary did not speak the app-server protocol". - Optional: run
app-server --helpagainst the configured path first, the same pre-checkCodexInstallation.ts:545already uses.
Impact
Minor bug or occasional failure. It hides a one-field configuration mistake behind an opaque protocol error, and the wrong version is then used for compatibility and update advice.
Version or commit
0.1.12-nightly.20261122.5071, with codex-cli 0.171.0.
Environment
Linux x64 (Mint 22.3), T3 Code server 0.1.12-nightly.20261122.5071, codex-cli 0.171.0 from the standalone package.
Logs or stack traces
CodexAppServerProtocolParseError: Codex App Server protocol operation 'decode-wire-message' failed.
at CodexAppServerProtocolParseError.fromSchemaError (t3:280662:11)
at CodexAppServerProtocol.request.awaitResponse (t3:281081:41)
at withCodexAppServerClient (t3:282048:24)
at CodexSkillsProbe.probe (t3:423808:115)
at OrchestratorMcpService.capabilities (t3:505802:50) {
[cause]: SchemaError: Expected a valid JSON string
}
Workaround
Clear the Codex Binary path (it falls back to codex on PATH) or point it at the real Codex binary. The next probe succeeds.
Activity