Skip to content

Import #770 so the build survives a second run on Windows - #13

Merged
Edo771977 merged 3 commits into
mainfrom
claude/focused-carson-khonz0
Sep 20, 2026
Merged

Edo771977 merged 3 commits into
mainfrom
claude/focused-carson-khonz0

Conversation

@Edo771977

Copy link
Copy Markdown
Owner

One import and one wrong number in a comment.

Imported

Upstream PR What it fixes Conflicts
#770 npm run build on Windows none

prebuild was mkdir -p plugins/codex/.generated/app-server-types && codex app-server generate-ts …. npm runs package scripts through cmd.exe on Windows, where -p is not a flag but a directory name, and mkdir errors on a directory that already exists instead of being a no-op like POSIX mkdir -p. So the first build leaves a stray -p directory next to the real one, and every build after that fails at the &&, before codex is 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.mjs said "The SessionEnd hook runs under a 5-second timeout (hooks.json)". hooks.json gives SessionStart 5 seconds and SessionEnd 30. It is the comment above the interrupt budgets — the one a person reads before touching them, now including CODEX_TURN_INTERRUPT_BUDGET_MS, which exists precisely to raise one — so it pointed at the wrong ceiling.

Surveyed and not taken

Upstream PR Why not
#771 run taskkill without a shell already here from #725, same shell: false, and our test asserts it
#762 kill the broker on teardown already here, with ownership verification and a liveness gate it does not have
#749 never signal a persisted pid would lose this fork's ability to reclaim a broker it has proven it owns
#755 bound the shutdown request ours is already bounded, with refused/unreachable semantics and a retry
#734 strip injected plugin context from thread titles plausible and cheap, but the trigger is unconfirmed here — filed as #12 instead of imported on faith

335/335, tsc clean. (The suite does not exercise prebuild; it needs the codex binary. What is verified here is that the new mkdirSync form is idempotent and creates the same path.)

🤖 Generated with Claude Code

https://claude.ai/code/session_01UXfvnjSC72HsM6EEPVt2Tg


Generated by Claude Code

aramfachan and others added 3 commits September 19, 2026 00:11
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
@Edo771977
Edo771977 merged commit a095b59 into main Sep 20, 2026
1 check passed
@Edo771977
Edo771977 deleted the claude/focused-carson-khonz0 branch September 20, 2026 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants