Repository navigation
fix: explain Codex config load errors caused by a deleted working directory - #626
Merged
Merged
Conversation
…ectory Codex reports any config load failure of `config/read` as the generic "failed to resolve feature override precedence". When the working directory of the agent is deleted while it runs, every config load fails with a bare "No such file or directory" (IJAI-2923). Add CodexErrorExplanations, which every app-server request error passes through in CodexAppServerClient.sendRequest: - a deleted or replaced working directory is named, with a hint to restart; - the config-file hint moves here from CodexAcpServer.handleError, so it applies to every request; handleError keeps only the logout action. IJAI-3685
Rizzen
pushed a commit
that referenced
this pull request
Oct 26, 2026
🤖 I have created a release *beep* *boop* --- ## [2.3.0](v2.2.2...v2.3.0) (2026-10-26) ### Features * add ACP v2 support again ([#620](#620)) ([9e1690f](9e1690f)) * mark session list rows of worktrees Codex made (agentWorktree) ([#631](#631)) ([aa02d43](aa02d43)) * narrow models to what the providers/set gateway lists ([#627](#627)) ([3f555f9](3f555f9)) * report the model of each native subagent session ([#678](#678)) ([51005a6](51005a6)) * return initial ACP v2 session commands ([#652](#652)) ([5e9b7c5](5e9b7c5)) * support AIR sessionIndex extension ([#590](#590)) v2 ([#622](#622)) ([2fd758c](2fd758c)) * support append-mode ACP system prompts ([#653](#653)) ([5993a12](5993a12)) ### Bug Fixes * disable Codex's Visualize skill, whose output ACP clients show as raw text ([#667](#667)) ([0ba94f5](0ba94f5)) * display the selected wire provider as JetBrains Air Gateway ([#589](#589)) ([cc54abf](cc54abf)) * explain Codex config load errors caused by a deleted working directory ([#626](#626)) ([a636804](a636804)) * explain invalid_encrypted_content errors after a provider change ([#668](#668)) ([a77829f](a77829f)) * hold a fork back from the session list until its session/fork response is out ([#642](#642)) ([59974c7](59974c7)) * include subagent edits in the agent file-change report ([#632](#632)) ([7d07123](7d07123)) * leave codex exec runs out of the session list without sessionIndex ([#639](#639)) ([df75d2b](df75d2b)) * migrate to ACP SDK 2.0 ([#649](#649)) ([c8fd166](c8fd166)) * publish the commands when the skills change ([#643](#643)) ([a62b568](a62b568)) * report structured ACP v2 failures ([#651](#651)) ([5377bfe](5377bfe)) * show a Codex subagent's follow-up turn in a new subagent session ([#634](#634)) ([7c761c7](7c761c7)) * synchronize ACP v2 foreground state ([#650](#650)) ([986955a](986955a)) * update codex to 0.164.0 ([#666](#666)) ([e227c0e](e227c0e)) * wait for the compact turn to finish ([#654](#654)) ([ced4c34](ced4c34)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: acp-release-bot[bot] <246668977+acp-release-bot[bot]@users.noreply.github.com>
mrmans0n
added a commit
to mrmans0n/codex-acp
that referenced
this pull request
Oct 26, 2026
Upstream v2.3.0 moved the ACP request routing from index.ts into AcpAgentRouter.ts (agentclientprotocol#620), wraps app-server request errors with explainCodexError (agentclientprotocol#626), adds insertion-aware prompts for steering (agentclientprotocol#620), a provider request ordering for providers/set (agentclientprotocol#627), and registers a baseline turn tracker before a provider restart resumes a session. None of this absorbs the downstream hook review (no upstream PR). Keep the downstream behaviour: the hook execution gate still fences thread/start, thread/resume, thread/fork, turn/start and review/start inside the new error wrapper; session/new, load, resume, fork and prompt still run under the review (prompt now forwards upstream's insertion); providers/set still invalidates the review after the routing changes; a provider restart still leaves a reviewed session for its reviewed lazy resume, before any baseline tracker is registered for it. The codexHooks initialize capability moves into initializeExtensionsMeta and stays ACP v1 only (the review is configured only by the v1 initialize). _codex/hooks/trust must keep accepting reviewToken, and its route now lives in AcpAgentRouter.ts, which is not a ledger file of this patch: this commit binds only after that path is added to the patch files (level 3). A new router test fails without it. Adapted from 4d43405.
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
When the agent's working directory is deleted while it runs, Codex fails every config load with a generic message (IJAI-2923, IJAI-3685):
config/read→-32603 failed to resolve feature override precedence: No such file or directory (os error 2)thread/start→-32600 failed to load configuration: No such file or directory (os error 2)Codex loads project config from its process working directory, which it inherits from codex-acp, so the error says nothing about the real cause.
Change
New
src/CodexErrorExplanations.ts: a single list of rules that every app-server request error goes through inCodexAppServerClient.sendRequest. A rule only rewrites the message; the error class, code and data stay, soCodexThreadErrorsand app-server recovery work as before.Codex cannot read its configuration: its working directory <path> was deleted or replaced after the agent started. Restart the agent.CodexAcpServer.handleError, so it now applies to every request that fails to load config, not only session new/fork. "feature override precedence" is reworded to "failed to load configuration". Errors that require logout are skipped.handleErrorkeeps only the logout action, viarequiresLogout()from the module.Wire shape note
Session new/fork config errors previously reached the client as
data: "<message>\n\nCheck…"(a string, because the text was passed as thedataargument ofRequestError.internalError). They now take the SDK's default path like every other internal error:data: {details: "<message>\n\nCheck…"}. The logout error keeps its stringdata.