[BUG] Main Agent for Scheduled Tasks does NOT have access to MCP / Connectors, Sub-Agents Do!
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When I use connectors for scheduled agents, the main agent does not have access to the tools. A work around was found when the main agent spawned subagents, and those subagents had access to the tools.
What Should Happen?
The main agent in scheduled processes should have access to the provided connector tools, not just the subagents.
Error Messages/Logs
ToolSearch query="Slack" → "No matching deferred tools found"
ToolSearch query="Notion" → "No matching deferred tools found"
Direct call mcp__Slack__slack_send_message → "No such tool available"
Direct call mcp__Notion__API-query-data-source → "No such tool available"
# But from a spawned Agent subagent, same tools work:
Agent → mcp__Slack__slack_send_message → ✅ success
Agent → mcp__Notion__API-query-data-source → ✅ success
Steps to Reproduce
- Create a scheduled trigger with MCP connections attached:
- Slack (mcp.slack.com/mcp)
- Notion (mcp.notion.com/mcp)
- Google Calendar (gcal.mcp.claude.com/mcp)
- Prompt the agent to call any MCP tool directly → fails
- Prompt the agent to use ToolSearch to find MCP tools → returns nothing
- Prompt the agent to spawn an Agent subagent that calls the same MCP tool by name → succeeds
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.91
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Tested with sleep delays (15s, 30s), ToolSearch retry loops, multiple tool name
prefixes (mcp__Slack__, mcp__claude_ai_Slack__), and wildcard allowed_tools
(mcp__Slack__*), methods given by #42323. None work from the main session. Only Agent subagents can
access the tools.
Trigger config includes both mcp_connections and allowed_tools with wildcards
— the connections are properly attached, just not exposed to the main session.
Solution Prompt:
\#\# CRITICAL: How MCP Tools Work in This Environment MCP tools will NEVER appear in ToolSearch. Do NOT use ToolSearch for MCP tools. Do NOT sleep and retry. The ONLY way to call MCP tools is by spawning Agent subagents that call them directly by name.
9 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Keeping up issue for possible reference to new workaround, haven't seen this mentioned in other issues.
I cannot get Notion to load reliably at all, even with sub-agents. It works sometimes in the main agent if I reply back telling it the tools are there. But not always. And telling it to do it within subagents doesn't seem to work either.
Weird... I'm just using the provided Notion connector. The main agent would not cooperate or detect the connector until I told it to use subagents. Hopefully they fix up cloud connectors cause they seem to be flaky 😔
Having some decent luck with adding this at the start of my prompt while still keeping "Load tools when needed" set in capabilities. Haven't tried repeated uses yet to see if it works long-term. I also deleted my scheduled task and created a new one from scratch, and that may have helped.
Thanks for putting your prompt 🙏, edited original comment to include the prompt I added as well if you want to reference it 🫡
Closing, @ashwin-ant reported on a fix being worked on in #35899.
Haha looks like someone either beat me to it or found it at the same time 😆
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.