[BUG] Webhook-triggered cloud routines still never load claude.ai connector tools (`enabledInChat: false`), while Cowork scheduled tasks do load them
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
What's Wrong?
A Claude Code routine (environment env_01FN5twfCTBEBcSNGMUrFmsB) that is triggered through its webhook starts a cloud session that never loads the tools of a connected claude.ai connector. The connector is a custom remote MCP server (Streamable HTTP, OAuth). In the session, ListConnectors shows the connector as authenticated (connected: true) but enabledInChat: false. None of its mcp__* tools are registered, and ToolSearch returns nothing for them.
The model's own report from the run:
The connector is authenticated, but enabledInChat is still false. Its tools aren't loaded here, and a search for them turns up nothing.
The same connector works in a Cowork scheduled task (environment env_011111111111111111111117). There, ToolSearch select: returns its tools as mcp__<Connector>__*, and calls to read-only tools succeed with no approval prompt. That was verified on 2026-09-17 on a scheduled fire, and again from a trigger created through the triggers API in the same environment (anthropics/claude-ai-mcp#999). The failure is specific to the Claude Code routine path. It does not affect the connector or its authentication.
This is the failure reported in #73845, #79319 and #86908. All three were closed by the inactivity bot as "not planned", not fixed. #73845 was still reproducing on 2.1.220 (CLAUDE_CODE_ENTRYPOINT=remote_trigger, CLAUDE_CODE_REMOTE_ENVIRONMENT_TYPE=cloud_default) when it was closed. No open issue tracks it now. #93939 (open) reports a related variant: enabledInChat: true, yet the tools still never appear.
What Should Happen?
A connector that is connected and attached to the routine should have its tools registered in the session the routine starts, whatever the trigger: webhook, schedule or manual run. A Cowork scheduled task already does this for the same connector.
Error Messages/Logs
Routine: trig_01Pxzg1ZBn3cx2jgaZN8enJv (created_via: http_api, no cron, fired through its API/webhook endpoint)
Run session: cse_015MRKiEFzGovq7q6hTieYKp, fired 2026-10-15T11:57:32Z, status ROUTINE_RUN_STATUS_SUCCEEDED
Environment: env_01FN5twfCTBEBcSNGMUrFmsB
Model: claude-sonnet-5-5
The connector is attached to the routine:
"mcp_connections": [
{ "connector_uuid": "ccd70119-698c-4666-b752-119bc57605e6",
"name": "LeoVegas-MCP-Gateway",
"url": "https://mcp.leovegas.dev/mcp",
"permitted_tools": [], "tool_policy_overrides": [] },
...
]
job_config.ccr.session_context.allowed_tools is ["Bash","Read","Write","Edit","Glob","Grep","WebFetch","WebSearch"].
Run log (condensed):
[11:57:38.629Z] init: model=claude-sonnet-5-5 cwd=/home/user
[11:57:41.988Z] tool_use ToolSearch: {"max_results":10,"query":"datadog metrics"}
[11:57:41.988Z] tool_result: No matching deferred tools found
[11:57:42.097Z] tool_use ToolSearch: {"max_results":20,"query":"mcp gateway"}
[11:57:42.097Z] tool_result: SearchMcpRegistry, ListConnectors, SuggestConnectors, WebFetch
A follow-up user message in the same session ("Use LeoVegas MCP Gateway for this") got the same result four minutes later:
[12:01:27.675Z] tool_use ToolSearch: {"max_results":5,"query":"select:mcp__leovegas"}
[12:01:27.779Z] tool_result: No matching deferred tools found
[12:01:28.132Z] tool_use ToolSearch: {"max_results":10,"query":"leovegas gateway datadog"}
[12:01:28.226Z] tool_result: No matching deferred tools found
[12:01:28.425Z] tool_use ListConnectors: {"keywords":["leovegas"]}
[12:01:28.860Z] tool_result:
{"name":"LeoVegas MCP Gateway","directoryUuid":"ccd70119-698c-4666-b752-119bc57605e6",
"installedServerId":"ccd70119-698c-4666-b752-119bc57605e6","customOAuthClientId":null,
"installState":"connected","isAuthless":false,"connected":true,"enabledInChat":false}
Steps to Reproduce
- Connect a remote MCP connector at claude.ai (custom connector, Streamable HTTP, OAuth) and complete authentication.
- Create a Claude Code routine with that connector attached, triggered through its webhook.
- Fire the webhook. Give the routine a prompt that calls
ListConnectors, then triesToolSearchfor the connector's tools. - Observed: the connector shows
connected: true,enabledInChat: false, nomcp__<Connector>__*tools, and empty search results. - For comparison, create a Cowork scheduled task with the same connector and prompt. Its tools load and work.
Claude Model
Sonnet (claude-sonnet-5-5)
Is this a regression?
I don't know. It has never worked for us on the Claude Code routine path, but #73845 calls it a regression of #35899.
Last Working Version
<n/a>
Claude Code Version
Not shown in the routine's run log (cloud runtime launched from /opt/claude-code/bin/claude), run on 2026-10-15
Platform
Anthropic API
Operating System
Other (cloud routine sandbox)
Terminal/Shell
Other (non-interactive cloud session)
Additional Information
- Related, all closed as stale or duplicate: #73845, #79319, #86908, #54441, #88853 (
enabledInChatflipping within one Code-on-web session). - Related, open: #93939, #94305.
- Our earlier report, which covers the Cowork half that is now fixed: anthropics/claude-ai-mcp#999.