fix: isolate diagnostic subprocess working directories - #238
Merged
Merged
Conversation
nicknisi
marked this pull request as ready for review
September 14, 2026 20:31
|
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
Run commands without an explicit
cwdfrom a fresh temporary directory instead of inheriting the project directory. This prevents Windows shell lookup from selecting repo-local tool shims and keeps diagnostic probes scoped to host tools and user-level MCP configuration.Preserve explicit working directories for trusted project commands. Clean up temporary directories and return a failed result if setup or cleanup fails.
Add real-process regression tests and a compiled-CLI smoke check covering runtime and MCP probes, including Windows batch shims and paths containing spaces.
Verification
bun run test: 2,767 tests passed across 160 files.bun run build,bun run typecheck, andbun run lintpassed. Changed TypeScript files pass formatting checks.env -u WORKOS_API_KEY sh scripts/command-smoke.sh ./dist/workospassed against the compiled CLI. Authenticated checks were skipped. Shell syntax and sandbox setup failure checks passed.Local verification used macOS and Bun 1.4.2. This PR remains a draft pending native Windows verification.