fix: isolate Codex home for local review runs#6
Closed
ZHOUKAILIAN wants to merge 1 commit into
Closed
Conversation
Contributor
Author
|
Closing this in favor of #7, which keeps only the narrow undefined.slice crash fix. |
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.
Summary
~/.codexskills and AGENTS baggage during ClawSweeper review runsauth.jsonandconfig.tomlin a temporary minimal.codexhome for the spawned Codex processspawnSyncreturns missing stdout/stderr by using a safe output tail helperWhy
Local review runs were failing for two separate reasons:
undefined.slice(...)when Codex process output was missing on failure paths.codex execinherited the user's full~/.codexenvironment, which could load personal AGENTS / superpowers skills and significantly distort or slow local review behavior compared with CI.This change makes local review execution more stable and closer to CI by isolating the spawned Codex environment while preserving the auth/config it still needs.
Verification
npm run checknode dist/clawsweeper.js review --openclaw-dir ../openclaw --item-number 45049 --batch-size 1 --max-pages 1 --codex-timeout-ms 120000