[BUG] Remote agent runs stuck on "Setting up a cloud container" — cannot cancel
Preflight Checklist
- [ ] 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?
Body:
Scheduled and manual remote agent runs are stuck indefinitely at the "Setting up a cloud container" step
and never progress to "Clone repository." The issue affects both the automated schedule (3:00 AM EDT)
and manual triggers.
What's happening:
- All runs show status "Running" but are frozen at container setup
- The cancel button is unavailable — runs cannot be cancelled from the UI
- Affected runs: today at 3:00 AM (scheduled), 3:24 PM (manual), 3:30 PM (manual)
- Agent name: "Second Brain — Nightly Journal", runs daily at 3:00 AM EDT
What Should Happen?
What should happen (normal flow):
- Setting up a cloud container — Anthropic spins up a fresh Linux VM in the cloud
- Clone repository — your connected GitHub repo gets cloned into that VM
- Run setup script — installs dependencies (Node, any tools your agent needs)
- Start Claude Code — Claude Code CLI launches and runs your scheduled prompt against your vault
The whole thing takes ~2-3 minutes and then the agent does its work, writes files, and the container
shuts down.
Error Messages/Logs
Steps to Reproduce
Steps to reproduce:
- Trigger a manual run on any scheduled remote agent
- Run enters "Setting up a cloud container" and never advances
- UI provides no way to cancel the stuck run
Expected behavior: Container provisions, repository clones, Claude Code starts, prompt executes.
Actual behavior: Stuck at container setup indefinitely. Multiple concurrent stuck runs accumulate with
no way to clear them.
Environment: Claude Code (Mac desktop app), remote agent via claude.ai
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.123
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 11 comments on GitHub. Read the full discussion on GitHub ↗