fix(desktop): surface codex config-parse failures and -32603 internal errors clearly#1745
Merged
Conversation
5e55991 to
255fdae
Compare
…ures
The codex login probe returned a bare bool, so a nonzero exit from a
config-parse error (e.g. unknown variant `ultra` in config.toml) was
indistinguishable from 'not authenticated'. The user was sent to run
`codex login` for a problem login cannot fix.
Changes:
- cli_probe.rs: login_probe_succeeds -> login_probe() returning a
three-way ProbeOutcome (LoggedIn | LoggedOut | ConfigInvalid).
ConfigInvalid fires only when stderr contains BOTH 'error loading
configuration' AND 'unknown variant' (the real codex parse-error
format), preventing false positives from unrelated exits.
- readiness.rs: new CliConfigInvalid Requirement variant carries the
probe_args, setup_copy, and a one-line stderr excerpt (diagnostic).
cli_login_requirements emits it on ConfigInvalid probe outcomes.
- runtime.rs: serializes CliConfigInvalid to the setup payload JSON.
- setup_mode.rs (buzz-acp): mirrors CliConfigInvalid in RequirementPayload
with instruction() copy naming ~/.{cli}/config.toml.
- configNudge.ts: adds cli_config_invalid to ConfigNudgeRequirement type
and the isConfigNudgeRequirement type guard.
- config-nudge-attachment.tsx: renders cli_config_invalid rows as
informational only -- no Doctor or Edit Agent CTA (neither can repair
an external config file). All-config-invalid cards are treated as
informational-only (no trigger, no pointer affordance), same as
auth-only cards.
- check-file-sizes.mjs: bumps readiness.rs limit by +18 lines.
AcpAvailabilityStatus is left as a flat unit enum so the runtime
catalog type and wire shape are unaffected.
Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
255fdae to
ced4fb3
Compare
When a codex-acp turn fails with JSON-RPC code -32603 (standard 'Internal error'), the raw 'Internal error' string was shown with no guidance. This typically means the configured model isn't supported by the installed codex-acp version. Map code -32603 to a generic-severity hint in friendlyAgentLastError. Severity stays 'generic' (never 'denied') because -32603 can come from any ACP harness for any reason -- we can't prove the cause. Copy uses conditional 'For Codex agents' phrasing so it is truthful for all ACP runtimes without false-claiming the model is always the cause. -32001 and -32002 handling is unchanged (regression-guarded by existing tests). New tests cover -32603 direct, -32603 embedded in the message string, and regression against the two recognized codes. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
ced4fb3 to
218a604
Compare
wpfleger96
added a commit
that referenced
this pull request
Jul 11, 2026
…ted adapter The @zed-industries/codex-acp package is deprecated (0.16.0, frozen 2026-06-08); its README redirects to @agentclientprotocol/codex-acp (1.1.2, 2026-07-09). The 1.x adapter changed config injection: the old adapter accepted `-c key=value` CLI args; the 1.x arg dispatch only handles `--version`, `login`, and `cli` — all other args fall through to startAcpServer(), which reads config exclusively from `process.env["CODEX_CONFIG"]` (a JSON blob). Our three `-c` flags were silently dropped, breaking relay connectivity (buzz-cli MCP subprocess blocked by the Seatbelt sandbox). `network_proxy.mode` and `network_proxy.domains` are gone from the 1.x schema; only `sandbox_workspace_write.network_access` is needed. Without a version gate, users with the old 0.16.x adapter still on PATH would see it as Available, receive the new CODEX_CONFIG spawn contract, and get silently broken relay connectivity (0.16.x reads -c args, ignores env vars). Added AdapterOutdated: version-probe (codex-acp --version) in discover_acp_runtimes and cli_login_requirements blocks the old adapter and surfaces the reinstall nudge. Note: #1745's config-parse classifier keys on codex's `error loading configuration` + `unknown variant` stderr wording. 1.x bundles @openai/codex@0.144.0; the wording comes from that layer. Likely unchanged, noted as a dependency, not fixed here. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
wpfleger96
added a commit
that referenced
this pull request
Jul 11, 2026
…ted adapter The @zed-industries/codex-acp package is deprecated (0.16.0, frozen 2026-06-08); its README redirects to @agentclientprotocol/codex-acp (1.1.2, 2026-07-09). The 1.x adapter changed config injection: the old adapter accepted `-c key=value` CLI args; the 1.x arg dispatch only handles `--version`, `login`, and `cli` — all other args fall through to startAcpServer(), which reads config exclusively from `process.env["CODEX_CONFIG"]` (a JSON blob). Our three `-c` flags were silently dropped, breaking relay connectivity (buzz-cli MCP subprocess blocked by the Seatbelt sandbox). `network_proxy.mode` and `network_proxy.domains` are gone from the 1.x schema; only `sandbox_workspace_write.network_access` is needed. Without a version gate, users with the old 0.16.x adapter still on PATH would see it as Available, receive the new CODEX_CONFIG spawn contract, and get silently broken relay connectivity (0.16.x reads -c args, ignores env vars). Added AdapterOutdated: version-probe (codex-acp --version) in discover_acp_runtimes and cli_login_requirements blocks the old adapter and surfaces the reinstall nudge. Note: #1745's config-parse classifier keys on codex's `error loading configuration` + `unknown variant` stderr wording. 1.x bundles @openai/codex@0.144.0; the wording comes from that layer. Likely unchanged, noted as a dependency, not fixed here. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
wpfleger96
added a commit
that referenced
this pull request
Jul 11, 2026
…ted adapter The @zed-industries/codex-acp package is deprecated (0.16.0, frozen 2026-06-08); its README redirects to @agentclientprotocol/codex-acp (1.1.2, 2026-07-09). The 1.x adapter changed config injection: the old adapter accepted `-c key=value` CLI args; the 1.x arg dispatch only handles `--version`, `login`, and `cli` — all other args fall through to startAcpServer(), which reads config exclusively from `process.env["CODEX_CONFIG"]` (a JSON blob). Our three `-c` flags were silently dropped, breaking relay connectivity (buzz-cli MCP subprocess blocked by the Seatbelt sandbox). `network_proxy.mode` and `network_proxy.domains` are gone from the 1.x schema; only `sandbox_workspace_write.network_access` is needed. Without a version gate, users with the old 0.16.x adapter still on PATH would see it as Available, receive the new CODEX_CONFIG spawn contract, and get silently broken relay connectivity (0.16.x reads -c args, ignores env vars). Added AdapterOutdated: version-probe (codex-acp --version) in discover_acp_runtimes and cli_login_requirements blocks the old adapter and surfaces the reinstall nudge. Note: #1745's config-parse classifier keys on codex's `error loading configuration` + `unknown variant` stderr wording. 1.x bundles @openai/codex@0.144.0; the wording comes from that layer. Likely unchanged, noted as a dependency, not fixed here. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
wpfleger96
added a commit
that referenced
this pull request
Jul 11, 2026
…ted adapter The @zed-industries/codex-acp package is deprecated (0.16.0, frozen 2026-06-08); its README redirects to @agentclientprotocol/codex-acp (1.1.2, 2026-07-09). The 1.x adapter changed config injection: the old adapter accepted `-c key=value` CLI args; the 1.x arg dispatch only handles `--version`, `login`, and `cli` — all other args fall through to startAcpServer(), which reads config exclusively from `process.env["CODEX_CONFIG"]` (a JSON blob). Our three `-c` flags were silently dropped, breaking relay connectivity (buzz-cli MCP subprocess blocked by the Seatbelt sandbox). `network_proxy.mode` and `network_proxy.domains` are gone from the 1.x schema; only `sandbox_workspace_write.network_access` is needed. Without a version gate, users with the old 0.16.x adapter still on PATH would see it as Available, receive the new CODEX_CONFIG spawn contract, and get silently broken relay connectivity (0.16.x reads -c args, ignores env vars). Added AdapterOutdated: version-probe (codex-acp --version) in discover_acp_runtimes and cli_login_requirements blocks the old adapter and surfaces the reinstall nudge. Note: #1745's config-parse classifier keys on codex's `error loading configuration` + `unknown variant` stderr wording. 1.x bundles @openai/codex@0.144.0; the wording comes from that layer. Likely unchanged, noted as a dependency, not fixed here. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
tlongwell-block
pushed a commit
that referenced
this pull request
Jul 11, 2026
Co-authored-by: Tyler Longwell <tlongwell@block.xyz> Signed-off-by: Tyler Longwell <tlongwell@block.xyz> * origin/main: fix(desktop): preserve archived observer history (#1752) fix(dev): install Lefthook hooks into shared .git/hooks dir (#1751) fix(desktop): surface codex config-parse failures and -32603 internal errors clearly (#1745) fix(desktop): fix workspace rail badge disappearance and persist mark-as-unread (#1747) chore(desktop): remove container-only npm-preflight E2E harness (#1749) fix(desktop): preflight npm prefix writability in doctor installs (#1732)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A Codex desktop upgrade overwrites the shared
~/.codex/config.tomlwith fields the older brewcodex-acpcore rejects. Buzz surfaced this two confusing ways:codex login" for what was really a config-PARSE error (unknown variant 'ultra').-32603 Internal errorwith no guidance.Fix #1 — distinguish config-parse failure from logged-out
login_probe_succeedsreturned a barebool, so a nonzero exit from a config-parse error was indistinguishable from "not authenticated."cli_probe.rs:login_probenow returnsProbeOutcome(LoggedIn | LoggedOut | ConfigInvalid).ConfigInvalidfires only when stderr contains BOTH"error loading configuration"AND"unknown variant"— the real codex parse-error format — preventing false positives.readiness.rs: newCliConfigInvalidRequirementvariant carriesprobe_args,setup_copy, and a one-line stderrdiagnostic.cli_login_requirementsemits it onConfigInvalidprobe outcomes.runtime.rs: serializesCliConfigInvalidinto the setup payload JSON.setup_mode.rs(buzz-acp): mirrorsCliConfigInvalidinRequirementPayloadwithinstruction()copy naming~/.{cli}/config.toml.configNudge.ts: addscli_config_invalidtoConfigNudgeRequirementtype and type guard.config-nudge-attachment.tsx: renderscli_config_invalidrows as informational only — no Doctor or Edit Agent CTA (neither can repair an external config file). All-config-invalid cards have no trigger/pointer affordance, same as auth-only cards.AcpAvailabilityStatusremains a flat unit enum — no payload-bearing variant that would poison the runtime catalog type.Fix #2 — actionable hint for -32603 CLI-ACP internal errors
-32603(standard JSON-RPC "Internal error") was shown verbatim with no guidance.friendlyAgentLastError.ts: maps code-32603to ageneric-severity hint. Copy uses "For Codex agents" conditional phrasing so it is truthful for all ACP runtimes without false-claiming the model is always the cause.-32001/-32002handling is unchanged (regression-guarded by existing tests).Gates
cargo fmt+cargo clippy(desktop-tauri + buzz-acp): ✅just desktop-tauri-test: ✅ 1274 passed, 0 failedjust desktop-typecheck: ✅just desktop-build: ✅just desktop-test: ✅ 2497 passed, 0 failedjust desktop-check(biome lint+format + file-size gate): ✅