Skip to content

feat(spawn): switch claude.ai connectors off for unattended Claude launches - #4

Merged
ktapa merged 1 commit into
mainfrom
fm/worker-connector-block
Sep 25, 2026
Merged

ktapa merged 1 commit into
mainfrom
fm/worker-connector-block

Conversation

@ktapa

@ktapa ktapa commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Intent

Every Claude Code agent firstmate launches unattended (crewmates, scouts, secondmates, including relaunch and recovery relaunches, on any Claude account) must start with claude.ai connectors (account-fetched MCP servers like Supabase, Vercel, Gmail) switched off, so no unattended agent holds a production-capable connector. Captain approved 2026-09-24. The captain's own primary firstmate session is out of scope and keeps its connectors. Mechanism: set ENABLE_CLAUDEAI_MCP_SERVERS=false as a per-launch env prefix in bin/fm-spawn.sh's claude launch template, alongside CLAUDE_CONFIG_DIR and CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false; the variable was confirmed against current official Claude Code MCP docs (equivalent to disableClaudeAiConnectors true). Remote secondmates launch through fm-spawn.sh on their remote home so they are covered without a separate launch line. Acceptance: portable regression in tests/fm-spawn-claude-account.test.sh inspecting the rendered launch for crewmate, scout, secondmate and respawn (shown red without the prefix, then green); live check on claude 2.1.282 showing no mcp__claude_ai_* tools with the variable and such tools without it (recorded in docs/verification/runtime-backends.md); behavior documented once in docs/configuration.md Claude connectors with a cross-reference in the harness-adapters claude reference; bin/fm-lint.sh clean. Do not edit user-level settings files. PR against the ktapa/firstmate fork only, never upstream; yolo off; no agent co-author trailers in commits.

What Changed

  • bin/fm-spawn.sh now prefixes every unattended Claude launch with ENABLE_CLAUDEAI_MCP_SERVERS=false, next to CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false. Crewmates, scouts, secondmates (including remote homes) and relaunch/recovery relaunches start without account-fetched claude.ai connectors. The captain's primary session and user-level settings files are not touched.
  • The branch also carries the earlier commits since the base. They let each firstmate home choose its own Claude account, via the new bin/fm-claude-account-lib.sh and matching changes in fm-spawn.sh, fm-control.sh and fm-afk-launch.sh. They stop away-mode busy-guard false positives and refuse silent wedge-alarm entry, via the new bin/fm-wedge-alarm-lib.sh, fm-captain-hold.sh and fm-supervise-daemon.sh. And they preserve merge polls across task metadata updates in fm-pr-lib.sh.
  • The branch adds and extends tests: tests/fm-spawn-claude-account.test.sh inspects the rendered launch for crewmate, scout, secondmate and respawn, alongside the relaunch, daemon, captain-hold and PR-check tests. It updates the docs: docs/configuration.md has a Claude connectors section cross-referenced from the harness-adapters claude reference, and docs/verification/runtime-backends.md and docs/verification/supervision.md record the verification.

Risk Assessment

✅ Low: The change is a single env-var prefix on the only claude launch template in fm-spawn.sh, which crewmate, scout, secondmate and relaunch all go through. The tests inspect the launch command that is actually rendered, and the docs are updated.

Testing

The new regression test renders the actual launch command for crewmate, scout, secondmate and respawn and checks it carries the prefix. It passes with the change and fails without it. The dispatch-profile test also passes. I did not re-run the live claude 2.1.282 check, and I did not run bin/fm-lint.sh (linters are out of scope for this phase). I did not read the docs changes. The worktree is clean after testing.

Evidence: Red-without-prefix result
not ok - crewmate launch must disable claude.ai connectors (missing: 'ENABLE_CLAUDEAI_MCP_SERVERS=false ')

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

⚠️ **Rebase** - 1 warning

Push main to origin, or rebase your branch onto origin/main, before gating.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • bash tests/fm-spawn-claude-account.test.sh (all pass, including the new connectors test)
  • bash tests/fm-spawn-dispatch-profile.test.sh (all pass)
  • Removed the ENABLE_CLAUDEAI_MCP_SERVERS=false prefix from bin/fm-spawn.sh and re-ran the account test: it went red with the crewmate launch missing the prefix. Restored the file with git checkout.
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

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