diff --git a/README.md b/README.md index ff5e22c7f..b6229b1b9 100644 --- a/README.md +++ b/README.md @@ -422,6 +422,7 @@ Broker and background-job lifecycle: | [#728](https://github.com/openai/codex-plugin-cc/pull/728) | a job whose worker died no longer reads as "running" forever; `/codex:status` reconciles the record against the live process | | [#725](https://github.com/openai/codex-plugin-cc/pull/725) | nothing is spawned through the user's shell on Windows, where MSYS path conversion mangled switches like `taskkill /PID` and left background workers unkillable under Git Bash (this supersedes [#735](https://github.com/openai/codex-plugin-cc/pull/735)) | | [#656](https://github.com/openai/codex-plugin-cc/pull/656) | `/codex:cancel` exits non-zero when neither the turn interrupt nor the worker kill confirmed the job stopped, instead of reporting a cancellation nothing proved | +| [#770](https://github.com/openai/codex-plugin-cc/pull/770) | `npm run build` works on Windows: npm runs scripts through cmd.exe, where `mkdir -p` made a stray `-p` directory and then failed every build after the first | Commands and flags: diff --git a/package.json b/package.json index 4216d1040..b2983bf5a 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "scripts": { "bump-version": "node scripts/bump-version.mjs", "check-version": "node scripts/bump-version.mjs --check", - "prebuild": "mkdir -p plugins/codex/.generated/app-server-types && codex app-server generate-ts --out plugins/codex/.generated/app-server-types", + "prebuild": "node -e \"require('node:fs').mkdirSync('plugins/codex/.generated/app-server-types',{recursive:true})\" && codex app-server generate-ts --out plugins/codex/.generated/app-server-types", "build": "tsc -p tsconfig.app-server.json", "test": "node --test tests/*.test.mjs" }, diff --git a/plugins/codex/scripts/session-lifecycle-hook.mjs b/plugins/codex/scripts/session-lifecycle-hook.mjs index c491494d4..0e658b848 100644 --- a/plugins/codex/scripts/session-lifecycle-hook.mjs +++ b/plugins/codex/scripts/session-lifecycle-hook.mjs @@ -23,11 +23,12 @@ import { resolveWorkspaceRoot } from "./lib/workspace.mjs"; export const SESSION_ID_ENV = "CODEX_COMPANION_SESSION_ID"; const PLUGIN_DATA_ENV = "CLAUDE_PLUGIN_DATA"; -// The SessionEnd hook runs under a 5-second timeout (hooks.json). The -// budgets below must sum comfortably under it: brokered turn interrupts -// (identity waits are capped per job and reserve room for the interrupt -// RPCs themselves), then a short exit grace for killed workers, then the -// shutdown exchange with its one retry. +// The SessionEnd hook runs under a 30-second timeout (hooks.json; SessionStart is the 5-second +// one). The budgets below must sum comfortably under it: brokered turn interrupts (identity waits +// are capped per job and reserve room for the interrupt RPCs themselves), then a short exit grace +// for killed workers, then the shutdown exchange with its one retry. The default interrupt budget +// is deliberately far below the hook timeout — the hook must return long before Claude Code stops +// waiting — and CODEX_TURN_INTERRUPT_BUDGET_MS raises it for a workspace with many active jobs. const TURN_INTERRUPT_BUDGET_MS = turnInterruptBudgetMs(); const TURN_IDENTITY_WAIT_MS = 500; const TURN_INTERRUPT_RESERVE_MS = 1000;