Skip to content

fix(#1396): phase agents no longer receive claude.ai connectors - #1464

Merged
admarble merged 3 commits into
mainfrom
feature/1396-fix-mcp-phase-agents-receive-the-user-s-claude-ai-
Oct 16, 2026
Merged

admarble merged 3 commits into
mainfrom
feature/1396-fix-mcp-phase-agents-receive-the-user-s-claude-ai-

Conversation

@admarble

@admarble admarble commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Phase agents were receiving the account's claude.ai connectors (Gmail, Docs, Drive, Calendar, Figma). The SDK adds them outside the #936 mcpServers allowlist, so an untrusted issue body could steer a bypassPermissions agent into a connected Gmail or Docs tool. The driver's one query() call now passes settings: { disableClaudeAiConnectors: true }.

  • src/lib/workflow/drivers/claude-code.ts: the option sits in the options object. No later spread (resume, env, mcpServers, model, effort) sets settings, so nothing overrides it.
  • strictMcpConfig isn't used, because it would also drop project .mcp.json, plugin and agent MCP (graph D-3).
  • docs/guides/mcp-integrations.md: one paragraph says the connectors are off for phase agents, and how.

AC mapping

AC Status Evidence
AC-1 Pending #1451 (post-merge) A phase run from a dist/ build of main is graph-2026-10-freeze-b's smoke node (I-6: MCP phases run the npm-pinned 2.19.0 and can't observe this fix). The lever was measured on CC 2.1.289 and 2.1.296 in docs/internal/graph-2026-10-freeze-b/evidence/probe-1396.md
AC-2 Met npx vitest run src/lib/workflow/drivers/claude-code.test.ts: 34/34. Mutation recorded below
AC-3 Met grep -n "disableClaudeAiConnectors" docs/guides/mcp-integrations.md → line 36

Because AC-1 is post-merge proof, this PR does not close the issue. #1396 stays open until #1451's report pastes the system/init server list.

Mutation verification

Mutation-verified: AC-2 — removed the settings: { disableClaudeAiConnectors: true } line from the query() options; claude-code.test.ts > ClaudeCodeDriver > MCP allowlist wiring (#936) > passes settings.disableClaudeAiConnectors to query() (mcp: true) (#1396 AC-2) failed, along with the mcp: false case and no other test; restored.

Follow-ups

  • Spec OQ-1, a settings opt-out for users who want connectors in a phase agent: dropped. No use case is known, and the issue ships it unconditionally.
  • Spec OQ-2, the Codex and opencode drivers: the claude.ai-connector source doesn't apply to them. Both set usesSdkMcp = false and don't run Claude Code, which is what fetches the account's connectors. Whether their own user-level MCP configs reach a phase agent is a separate question, and the runner has raised it with the owner.

Part of #1396


🤖 Generated with Claude Code

@admarble admarble changed the title fix(#1396): phase agents receive the user's claude.ai connectors (Gmail, Docs) outside the #936 allowlist fix(#1396): phase agents no longer receive claude.ai connectors Oct 16, 2026
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