Expand description
The claude.ai account’s connectors (Gmail, Calendar, Drive, Docs) are off in Claude agents by default.
Claude Code loads the connectors of the signed-in claude.ai account into every session. AgentMux has its
own Google tools (Gmail, Calendar, Drive, once the person grants them), so the claude.ai ones only
add a second, unauthorized copy of each, and agents keep telling the person to authorize them in claude.ai.
The switch is an environment variable the CLI reads at launch (ENABLE_CLAUDEAI_MCP_SERVERS, also the
CLI’s disableClaudeAiConnectors setting). Its name is the CLI’s, not ours: when the pinned CLI version
moves, the canary test below and this note are rechecked against it.
Setting agent:claudeaiconnectors: false (the default) launches Claude agents with the variable set to
false; true leaves it unset, so the CLI loads the connectors as it does outside AgentMux. It takes
effect at an agent’s next launch.
Constants§
- ENV_
SWITCH - The CLI’s own switch:
falsekeeps the claude.ai connectors out of the session. - SETTING_
CLAUDEAI_ CONNECTORS - The setting. Off by default.
Functions§
- apply
- Keep the connectors out of a launch environment: a Claude agent’s, when the setting is off. It
overwrites what the environment already carries (a persisted
cmd:env), as the setting is the only way to turn them back on. Any other provider’s launch is left alone. - apply_
for_ spawn applyfor a launch ofprovider(already resolved from a legacy alias), reading the setting now. Called fromcli_messaging::apply_for_spawn, which resolves the block’s provider for both switches.- enabled
- Whether the connectors stay on: only a boolean
trueturns them on. - install_
config - Attach the live settings, so
SETTING_CLAUDEAI_CONNECTORSis read at each launch (bootstrap, throughcli_messaging::install_config).