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
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.