anthropics / anthropics/claude-code
[BUG] Scheduled/automated Claude Code sessions don't load write-capable Slack MCP tools, even when the connector is connected and enabled
- Dominant language
- Python
- Stars
- 145k
- Forks
- 23.1k
- PR merge metrics
- PR metrics pending
Description
### Preflight Checklist
- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) 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?
In a scheduled Claude Code task (a recurring "morning briefing" job), the Slack MCP connector was authenticated and enabled, but slack_send_message was not present in the session's tool list — only read/search tools were available (slack_read_channel, slack_search_public_and_private, slack_read_thread, etc.). The task could gather all requested Slack/Gmail/Calendar data but could not post the result to the target Slack channel as instructed.
### What Should Happen?
A connector that's connected and enabled for chat should expose the same tool set regardless of whether the invoking session is interactive or scheduled/automated — or, if write-capable tools are intentionally withheld from scheduled sessions as a safety measure, that restriction should be documented and surfaced to the user/task (e.g., a clear error or a visible note in the tool list) rather than the tool silently not existing.
Impact: Any scheduled/automated task that needs to post to Slack (not just read) currently fails silently on the send step, with no indication until the user manually compares against an interactive session.
### Error Messages/Logs
```shell
ListConnectors/SearchMcpRegistry both showed the Slack connector as connected: true, enabledInChat: true, with slack_send_message listed among its native tools (directoryUuid 597f662f-36de-437e-836e-5a81013cbfbe, installedServerId 93c89bcf-95f2-4b79-8865-119e69d20b94).
ToolSearch("select:slack_send_message") returned "No matching deferred tools found" in the scheduled session, despite every other Slack tool from the same connector loading fine.
The user then tested the identical action (posting to the same Slack channel) from an interactive claude.ai session and an interactive Claude Code session — both succeeded immediately with slack_send_message available.
```
### Steps to Reproduce
1. Create a briefing routine and ask the agent to post to a specific Slack channel. Run on a recurring schedule.
### Claude Model
Sonnet (default)
### Is this a regression?
I don't know
### Last Working Version
_No response_
### Claude Code Version
1.52386.6
### Platform
Anthropic API
### Operating System
Windows
### Terminal/Shell
Windows Terminal
### Additional Information
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
No source files or tests are named. Start by reproducing the scheduled routine and comparing its available Slack tools with an interactive session; done means scheduled sessions either expose slack_send_message or clearly surface the intentional restriction.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100