Skip to content

Promote cmux-node-options-tmpdir-guard; launchd cross-ref (bundle 1.130.0) - #333

Merged
debedb merged 1 commit into
masterfrom
add-skill-cmux-node-options-tmpdir-guard
Sep 22, 2026
Merged

debedb merged 1 commit into
masterfrom
add-skill-cmux-node-options-tmpdir-guard

Conversation

@debedb

@debedb debedb commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

The launchd-env-sync-session-leak branch carried a "Related" pointer to
cmux-node-options-tmpdir-guard that never landed, because the target was
only ever a personal skill under ~/.claude/skills - a shadow copy nobody
else has. Adding the pointer alone would have shipped a dangling reference
in a public repo, so the target comes with it.

cmux launches Claude Code with a --require shim whose .cjs lives under
$TMPDIR. macOS reaps files there once they go untouched for about three
days, which is exactly the window a reboot-surviving cmux session lives
past. The file disappears while NODE_OPTIONS still names it, and from then
on every node/claude invocation in that session dies on a missing --require
target - a failure that reads as a broken toolchain and arrives days after
anything changed.

The skill carries the stopgap for builds predating manaflow-ai/cmux#3699: a
persistent copy under $HOME, and a LaunchAgent that recreates the $TMPDIR
file and refreshes its mtime daily, well inside the reap window. The subtle
part is why the LaunchAgent can find the right file at all - it runs in the
same per-user launchd context as the GUI app, so getconf DARWIN_USER_TEMP_DIR
returns the same per-boot temp base cmux used, and nothing has to be
hardcoded.

The personal copy's closing reference pointed at a memory note with no
public counterpart; it is replaced by a pointer back to
launchd-env-sync-session-leak, which is the same class of failure from the
other direction - a stale value synced into launchd, rather than a guard
file reaped out from under one.

Versions: bundle 1.130.0; launchd-env-sync-session-leak skill 1.1.0 ->
1.2.0, and its standalone plugin 1.0.0 -> 1.2.0, which had been left behind
at 1.0.0 by an earlier skill bump.

🤖 Generated with Claude Code

…30.0)

The launchd-env-sync-session-leak branch carried a "Related" pointer to
cmux-node-options-tmpdir-guard that never landed, because the target was
only ever a personal skill under ~/.claude/skills - a shadow copy nobody
else has. Adding the pointer alone would have shipped a dangling reference
in a public repo, so the target comes with it.

cmux launches Claude Code with a --require shim whose .cjs lives under
$TMPDIR. macOS reaps files there once they go untouched for about three
days, which is exactly the window a reboot-surviving cmux session lives
past. The file disappears while NODE_OPTIONS still names it, and from then
on every node/claude invocation in that session dies on a missing --require
target - a failure that reads as a broken toolchain and arrives days after
anything changed.

The skill carries the stopgap for builds predating manaflow-ai/cmux#3699: a
persistent copy under $HOME, and a LaunchAgent that recreates the $TMPDIR
file and refreshes its mtime daily, well inside the reap window. The subtle
part is why the LaunchAgent can find the right file at all - it runs in the
same per-user launchd context as the GUI app, so getconf DARWIN_USER_TEMP_DIR
returns the same per-boot temp base cmux used, and nothing has to be
hardcoded.

The personal copy's closing reference pointed at a memory note with no
public counterpart; it is replaced by a pointer back to
launchd-env-sync-session-leak, which is the same class of failure from the
other direction - a stale value synced into launchd, rather than a guard
file reaped out from under one.

Versions: bundle 1.130.0; launchd-env-sync-session-leak skill 1.1.0 ->
1.2.0, and its standalone plugin 1.0.0 -> 1.2.0, which had been left behind
at 1.0.0 by an earlier skill bump.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@debedb
debedb merged commit a2a52c8 into master Sep 22, 2026
3 checks passed
@debedb
debedb deleted the add-skill-cmux-node-options-tmpdir-guard branch September 22, 2026 18:42
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.

1 participant