mirror of
https://github.com/Gitlawb/openclaude.git
synced 2026-11-06 20:58:14 -04:00
* feat(launcher): support --max-old-space-size-percentage heap sizing Convert Node's percentage heap flag into --max-old-space-size from constrained or total RAM so small containers and large workstations can avoid the fixed 8192 MB cap on every supported Node version. Fixes #2213 * fix(launcher): reject unconstrained memory sentinels in heap percentage Ignore libuv UINT64_MAX constrainedMemory values, clamp sub-megabyte percentage results to 1 MB, and keep spaced heap-flag values on background Node launches. * fix(launcher): report unresolved heap percentage instead of silent MB fallback A valid percentage with unknown available memory no longer looks like an unrelated megabyte env or default success; the launcher warns once, docs state full precedence, and child NODE_OPTIONS tests call the real helper. * fix(launcher): strip launcher heap flags when Node already has a cap Commander rejected --max-old-space-size-percentage on native heap+gc and disable-relaunch paths. Strip those argv tokens before import, and do not treat a following non-percentage word as the flag value. * fix(launcher): propagate execArgv heap caps to subprocess NODE_OPTIONS Child tools inherit NODE_OPTIONS, not the parent process.execArgv. When the CLI already started with a numeric --max-old-space-size cap there, copy that value into NODE_OPTIONS instead of defaulting to 8192 MB. Also strip launcher-only heap flags on the OPENCLAUDE_HEAP_RELAUNCHED early-return path and harden launcher integration tests with Node 22-safe execArgv fixtures.