Repository navigation
Import #770 so the build survives a second run on Windows - #13
Merged
Merged
Conversation
npm runs package scripts with cmd.exe on Windows, where `mkdir -p` is
not a flag: `npm run build` created a directory literally named "-p"
next to the real one. Create the generated-types directory with
`node -e "require('node:fs').mkdirSync(..., {recursive: true})"`,
which behaves the same under cmd.exe and POSIX shells.
Verified on Windows 11 (cmd.exe as npm script shell, Node 24.18,
codex-cli 0.155.0-alpha): `npm run build` generates the app-server
types and `tsc -p tsconfig.app-server.json` succeeds, with no stray
"-p" directory. Also verified under Git Bash.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`mkdir -p` is a POSIX idiom, and npm runs package scripts through cmd.exe
on Windows: `-p` is taken as a directory name, and cmd's mkdir errors on a
directory that already exists instead of being a no-op. So the first build
leaves a stray "-p" directory next to the real one, and every build after
that fails on the `&&` before codex ever runs.
Creating the directory through node's own mkdirSync({recursive:true})
behaves identically under cmd.exe and a POSIX shell.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UXfvnjSC72HsM6EEPVt2Tg
The comment above the interrupt budgets named the wrong hook's timeout: hooks.json gives SessionStart 5 seconds and SessionEnd 30. It is the comment someone reads before touching those budgets — now including CODEX_TURN_INTERRUPT_BUDGET_MS, which exists to raise one of them — so starting from the wrong ceiling is exactly the wrong place to start. Also records openai#770 in the imports table. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UXfvnjSC72HsM6EEPVt2Tg
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.
One import and one wrong number in a comment.
Imported
npm run buildon Windowsprebuildwasmkdir -p plugins/codex/.generated/app-server-types && codex app-server generate-ts …. npm runs package scripts through cmd.exe on Windows, where-pis not a flag but a directory name, andmkdirerrors on a directory that already exists instead of being a no-op like POSIXmkdir -p. So the first build leaves a stray-pdirectory next to the real one, and every build after that fails at the&&, beforecodexis ever reached.The replacement creates the directory through node's own
mkdirSync({recursive: true}), which behaves identically under cmd.exe and a POSIX shell. Verified here that it is idempotent; the upstream author reports verifying the whole build on Windows 11 with both cmd.exe and Git Bash.The comment
session-lifecycle-hook.mjssaid "The SessionEnd hook runs under a 5-second timeout (hooks.json)".hooks.jsongives SessionStart 5 seconds and SessionEnd 30. It is the comment above the interrupt budgets — the one a person reads before touching them, now includingCODEX_TURN_INTERRUPT_BUDGET_MS, which exists precisely to raise one — so it pointed at the wrong ceiling.Surveyed and not taken
shell: false, and our test asserts itrefused/unreachablesemantics and a retry335/335,
tscclean. (The suite does not exerciseprebuild; it needs thecodexbinary. What is verified here is that the newmkdirSyncform is idempotent and creates the same path.)🤖 Generated with Claude Code
https://claude.ai/code/session_01UXfvnjSC72HsM6EEPVt2Tg
Generated by Claude Code