anthropics / anthropics/claude-code

[BUG] MCP connector calls hang indefinitely from scheduled-task sessions (work fine interactively)

Open
#95,428 0 comments 0 reactions 0 assignees View on GitHub
area:desktop area:mcp area:routines bug platform:macos
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?

Tool calls to remote MCP connectors (confirmed with Gmail, Slack, and Asana) never complete when made from a scheduled-task session — no error, no timeout, no permission prompt, just permanent silence. The identical calls, with identical arguments, succeed immediately when made from a normal interactive session.

### What Should Happen?

The connector tool call in the scheduled-task session should return a result, the same way it does in an interactive session.

### Error Messages/Logs

```shell
None — that's part of the problem. No error surfaces anywhere; list_events on the hung session shows no error, no additional messages, and get_session's lastActivityAt simply stops advancing. No permission/approval prompt was visible either, confirmed by physically checking the session's window.
```

### Steps to Reproduce

1. In an interactive session, connect Gmail/Slack/Asana connectors and confirm a tool call works (e.g. Gmail's search_threads).
2. Create a scheduled task whose prompt calls that same connector tool.
3. Trigger the task manually ("Run now").
4. Watch the resulting session's transcript.

### Claude Model

Sonnet (default)

### Is this a regression?

No, this never worked

### Last Working Version

_No response_

### Claude Code Version

N/A — using the Claude desktop app's Code tab; claude --version isn't available as a separate CLI in this environment.

### Platform

Anthropic API

### Operating System

macOS

### Terminal/Shell

Terminal.app (macOS)

### Additional Information

Non-connector tool calls in the same scheduled-task session (Read, ToolSearch, the Artifact tool) worked fine — this appears specific to remote MCP connector calls, not scheduled tasks generally. Happy to provide exact session IDs / task prompt from my repro if useful.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the scheduled task with the “Run now” entry point, then compare its transcript, list_events output, and get_session lastActivityAt with an interactive MCP call. The issue names no source files or tests, so the implementation entry point and a suitable regression test still need to be located; done means remote connector calls return results instead of hanging silently.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.