Skip to content

fix(bin): disable Claude worker auto-updates by default - #7139

Open
mremond wants to merge 1 commit into
kunchenguid:mainfrom
mremond:fm/fm-7041-claude-autoupdater-off
Open

mremond wants to merge 1 commit into
kunchenguid:mainfrom
mremond:fm/fm-7041-claude-autoupdater-off

Conversation

@mremond

@mremond mremond commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Intent

Lance les développements: start #7041 (keep Claude worker auto-updater from replacing the global install) now, within the exact class/default the maintainer accepted in #7041 (comment). Normal delivery path (no-mistakes attestation, fork push, upstream PR); merges are the maintainer's.

Issue substance: on macOS with Claude Code installed as a global npm package, a stock bin/fm-spawn.sh Claude crewmate launch ran Claude Code's auto-updater during its first turn; the global package was replaced but its postinstall did not run, leaving bin/claude.exe as a placeholder so every new claude invocation failed with "claude native binary not installed". #5959 and #6002 guard only the live-harness test gate: fm-spawn.sh embeds DISABLE_AUTOUPDATER into the launch only when the spawning process already has it set, so ordinary worker launches keep Claude Code's default auto-update. Suggested fix: disable the auto-updater for every Firstmate-launched Claude worker, e.g. DISABLE_AUTOUPDATER=1 in the Claude launch prefix next to CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false, or make it an opt-out setting.
Maintainer acceptance: outcome ready-for-pr. If it ships on by default for every Claude worker it changes the unconfigured launch, so the contract class is new-default, which means a merge-or-leave call by the maintainer when the PR is ready and is not a reason to hold off opening one; an opt-in or opt-out-setting variant would be judged on its own diff. No open PR covers this; #6665 and #6771 set the variable only for their own live tests.

Closes #7041

The contract class is new-default: it is on by default for every Firstmate-launched Claude worker, and an explicit DISABLE_AUTOUPDATER from the spawner still wins.
The secondmate path is proven by the deterministic launch-builder test, not by a live secondmate launch.

What Changed

  • Default Claude launches to DISABLE_AUTOUPDATER=1, preserving explicit nonempty spawner values through backend daemons and launch-environment filtering. Other harnesses receive no new default.
  • Document the default and override behavior.
  • Add synthetic launch coverage for Claude ships, scouts, and secondmates, explicit overrides and shell quoting, environment filtering, and non-Claude launches; update dispatch launch expectations.

Risk Assessment

✅ Low: The change adds a narrow Claude launch default at the shared environment boundary, preserves existing explicit overrides, and includes behavioral regression coverage consistent with the accepted intent.

Testing

Focused regressions passed, and isolated real launches confirmed the default, filtering, explicit-value preservation, relaunch, and non-Claude boundary. Setup failures were corrected and labs removed. Global-install corruption and a real secondmate were not reproduced; this environment-only change required no visual screenshot.

  • Live validation: ⚠️ inconclusive - 5 of 6 scenarios driven live against the product
Scenario Result Live Evidence
Launch an unconfigured Claude scout: the real Claude process receives DISABLE_AUTOUPDATER=1 ✅ pass live live-launch.txt
Launch a Claude ship with an empty environment allowlist: filtering preserves the updater-disable default ✅ pass live ship-filter-live.txt
Supply an explicit value containing a quote: the executed Claude launch preserves it unchanged ✅ pass live explicit-live.txt
Launch and relaunch a raw Claude command: both executions receive the updater-disable default ✅ pass live raw-relaunch-live.txt
Launch a raw Codex command with filtering: DISABLE_AUTOUPDATER remains unset ✅ pass live codex-live.txt
Launch a Claude secondmate: it receives the same default with and without filtering ⏸️ untested no The focused executable regression passed using a synthetic backend. A real secondmate requires a seeded home containing AGENTS.md; creating that fixture independently is outside the explicit memory-fi…
Evidence: Claude scout process environment

Source: Claude scout process environment

/var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T//fm-lab.41xZLT
can't find pane: AU-live
[
  {
    "pid": "33556",
    "command": "claude",
    "environment": {
      "DISABLE_AUTOUPDATER": "1",
      "CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION": "false",
      "FM_HOME": "/var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T//fm-lab.41xZLT"
    }
  }
]
rm: /var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T//fm-lab.41xZLT/state/AU-live.git-hooks/pre-rebase: Permission denied
rm: /var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T//fm-lab.41xZLT/state/AU-live.git-hooks/pre-applypatch: Permission denied
rm: /var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T//fm-lab.41xZLT/state/AU-live.git-hooks/pre-auto-gc: Permission denied
rm: /var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T//fm-lab.41xZLT/state/AU-live.git-hooks/pre-merge-commit: Permission denied
rm: /var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T//fm-lab.41xZLT/state/AU-live.git-hooks/post-commit: Permission denied
rm: /var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T//fm-lab.41xZLT/state/AU-live.git-hooks/sendemail-validate: Permission denied
rm: /var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T//fm-lab.41xZLT/state/AU-live.git-hooks/applypatch-msg: Permission denied
rm: /var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T//fm-lab.41xZLT/state/AU-live.git-hooks/prepare-commit-msg: Permission denied
rm: /var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T//fm-lab.41xZLT/state/AU-live.git-hooks/post-checkout: Permission denied
rm: /var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T//fm-lab.41xZLT/state/AU-live.git-hooks/post-applypatch: Permission denied
rm: /var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T//fm-lab.41xZLT/state/AU-live.git-hooks/post-rewrite: Permission denied
rm: /var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T//fm-lab.41xZLT/state/AU-live.git-hooks/commit-msg: Permission denied
rm: /var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T//fm-lab.41xZLT/state/AU-live.git-hooks/pre-push: Permission denied
rm: /var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T//fm-lab.41xZLT/state/AU-live.git-hooks/post-merge: Permission denied
rm: /var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T//fm-lab.41xZLT/state/AU-live.git-hooks/pre-commit: Permission denied
rm: /var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T//fm-lab.41xZLT/state/AU-live.git-hooks: Directory not empty
rm: /var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T//fm-lab.41xZLT/state: Directory not empty
rm: /var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T//fm-lab.41xZLT: Directory not empty
Evidence: Claude ship with empty environment allowlist

Source: Claude ship with empty environment allowlist

/var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T//fm-lab.LDSihG
[
  {
    "pid": "72096",
    "command": "claude",
    "environment": {
      "DISABLE_AUTOUPDATER": "1",
      "CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION": "false",
      "FM_HOME": null
    }
  }
]
Evidence: Explicit updater value preserved

Source: Explicit updater value preserved

/var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T//fm-lab.QmwHcs
mremond@mac-mini demo % treehouse get
🌳 Setting up worktree...
🌳 Entered worktree at /var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T/fm-lab.QmwHcs/pool/.treehouse/demo-43aafd/1/demo
. Type 'exit' to return.
mremond@mac-mini demo % cd -- '/private/var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T/fm-lab.QmwHcs/pool/.treehouse/de
mo-43aafd/1/demo'
mremond@mac-mini demo % export GOTMPDIR=/tmp/fm-AU-live/gotmp
mremond@mac-mini demo % export COMPACT_ADVISER_DISABLE=1
mremond@mac-mini demo % export FM_TASK_ID=AU-live
mremond@mac-mini demo % . '/tmp/fm-AU-live+507096d8fa82bd0b24c500545598c3c69c80d383f2dba44e9ed222eccb61dd3b/launch.s1791
807930.93770.23118.sh'
2.1.108 (Claude Code)
UPDATER_VALUE=<explicit ' value>
mremond@mac-mini demo %
Evidence: Raw Claude launch and relaunch

Source: Raw Claude launch and relaunch

/var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T//fm-lab.OTNYPc
mremond@mac-mini demo % treehouse get
🌳 Setting up worktree...
🌳 Entered worktree at /var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T/fm-lab.OTNYPc/pool/.treehouse/demo-c859c5/1/demo
. Type 'exit' to return.
mremond@mac-mini demo % cd -- '/private/var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T/fm-lab.OTNYPc/pool/.treehouse/de
mo-c859c5/1/demo'
mremond@mac-mini demo % export GOTMPDIR=/tmp/fm-AU-live/gotmp
mremond@mac-mini demo % export COMPACT_ADVISER_DISABLE=1
mremond@mac-mini demo % export FM_TASK_ID=AU-live
mremond@mac-mini demo % . '/tmp/fm-AU-live+57089d6445fb08865c5e581f2dd7e4385fdbf9667eb5fe380d8ba408e246677d/launch.s1791
807948.1582.18931.sh'
2.1.108 (Claude Code)
UPDATER_VALUE=<1>
mremond@mac-mini demo % cd -- '/private/var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T/fm-lab.OTNYPc/pool/.treehouse/de
mo-c859c5/1/demo'
mremond@mac-mini demo % export GOTMPDIR=/tmp/fm-AU-live/gotmp
mremond@mac-mini demo % export COMPACT_ADVISER_DISABLE=1
mremond@mac-mini demo % export FM_TASK_ID=AU-live
mremond@mac-mini demo % . '/tmp/fm-AU-live+57089d6445fb08865c5e581f2dd7e4385fdbf9667eb5fe380d8ba408e246677d/launch.s1791
807955.3388.18172.sh'
2.1.108 (Claude Code)
UPDATER_VALUE=<1>
mremond@mac-mini demo %
Evidence: Codex receives no updater default

Source: Codex receives no updater default

/var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T//fm-lab.LdjNId
mremond@mac-mini demo % treehouse get
🌳 Setting up worktree...
🌳 Entered worktree at /var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T/fm-lab.LdjNId/pool/.treehouse/demo-5df754/1/demo
. Type 'exit' to return.
mremond@mac-mini demo % cd -- '/private/var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T/fm-lab.LdjNId/pool/.treehouse/de
mo-5df754/1/demo'
mremond@mac-mini demo % export GOTMPDIR=/tmp/fm-AU-live/gotmp
mremond@mac-mini demo % export COMPACT_ADVISER_DISABLE=1
mremond@mac-mini demo % export FM_TASK_ID=AU-live
mremond@mac-mini demo % . '/tmp/fm-AU-live+ae31493a55237ff87619a40c32b8c37e67172f50cfeb11949a2a1d3fd8cc6f84/launch.s1791
807960.6668.1286.sh'
WARNING: proceeding, even though we could not create PATH aliases: Refusing to create helper binaries under temporary di
r "/var/folders/_v/ydbf105x0n9bnb74b0985xt40000gn/T/" (codex_home: AbsolutePathBuf("/var/folders/_v/ydbf105x0n9bnb74b098
5xt40000gn/T/fm-lab.LdjNId/user/.codex"))
codex-cli 0.160.0
UPDATER_VALUE=<unset>
mremond@mac-mini demo %
- Outcome: ⚠️ 1 warning across 1 run (6m46s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

⚠️ **Test** - 1 warning
  • ⚠️ live validation verdict: inconclusive (5 of 6 scenarios were driven live against the product); untested: Launch a Claude secondmate: it receives the same default with and without filtering
  • Live validation: ⚠️ inconclusive - 5 of 6 scenarios driven live against the product
Scenario Result Live Evidence
Launch an unconfigured Claude scout: the real Claude process receives DISABLE_AUTOUPDATER=1 ✅ pass live live-launch.txt
Launch a Claude ship with an empty environment allowlist: filtering preserves the updater-disable default ✅ pass live ship-filter-live.txt
Supply an explicit value containing a quote: the executed Claude launch preserves it unchanged ✅ pass live explicit-live.txt
Launch and relaunch a raw Claude command: both executions receive the updater-disable default ✅ pass live raw-relaunch-live.txt
Launch a raw Codex command with filtering: DISABLE_AUTOUPDATER remains unset ✅ pass live codex-live.txt
Launch a Claude secondmate: it receives the same default with and without filtering ⏸️ untested no The focused executable regression passed using a synthetic backend. A real secondmate requires a seeded home containing AGENTS.md; creating that fixture independently is outside the explicit memory-fi…
  • bash tests/fm-live-gate.test.sh
  • bash ~/.no-mistakes/evidence/01M4R0VBX5J31ZB93BX9BA81C3/live-launch.sh — isolated real tmux and Claude scout
  • NAME=ship-filter KIND=ship FILTER=1 bash .../live-launch.sh
  • NAME=explicit FILTER=1 EXPLICIT="explicit ' value" LAUNCH_CMD='claude --version; ...' bash .../live-launch.sh
  • NAME=raw-relaunch RELAUNCH=1 FILTER=1 LAUNCH_CMD='claude --version; ...' bash .../live-launch.sh
  • NAME=codex FILTER=1 LAUNCH_CMD='codex --version; ...' bash .../live-launch.sh
  • Inspected real Claude process environments and captured terminal output; stopped private tmux servers and removed disposable labs.
  • git status --short — no worktree changes
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thank you @mremond, this one is short and easy to review.

I read the diff against main 20dcbf91. The body's Closes #7041 checks out. bin/fm-spawn.sh now adds export DISABLE_AUTOUPDATER=1 to every Claude launch (ship, scout, secondmate, raw, relaunch), inside the allowlist wrapper. A nonempty spawner value still wins, and other harnesses get nothing new. Docs and launch-builder tests are updated. No workflows, secrets, or network changes. The no-mistakes attestation matches head 836cc37b. Live evidence covers 5 of 6 scenarios, and the untested secondmate case uses the same launch assembly and has a deterministic test. That's enough for me.

Contract-class: new-default. "By default" changes the environment of every unconfigured Claude launch, as #7041's triage expected. That means a merge-or-leave call for Kun, not an auto-merge.

VISION.md, rule by rule: one captain, one interface: aligns (no surprise broken claude binary). Authority is explicit: aligns. A worker should not change the captain's harness install, but the default itself is Kun's to accept. Scripts own the mechanics: aligns (one launch-prefix export). A restart is a non-event: aligns (stable harness version across launches). Delegation with a spine: neutral. Fleet outlives any vendor: aligns (version choice stays captain-owned and inspectable). Scope: aligns.

CI: "Behavior portable serial 6" and "Behavior tests (Herdr)" failed while installing tools (actionlint and Herdr), before any test ran. "Behavior portable serial 2" hit the job timeout. I've rerun the failed jobs. Nothing is needed from you. Once it's green, this goes to Kun for his decision.

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.

Worker launches let Claude Code's auto-updater replace the captain's global install

2 participants