Scheduled/background task sessions hang on their 2nd shell command (desktop app, Windows 11)
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?
Since 6/30, every scheduled-task (routine) session in the desktop app freezes on an early Bash tool call — typically the 2nd command. The command never spawns an OS process, no result is returned, and the Bash tool's 2-minute timeout never fires; the session shows "running" forever. Interactive sessions on the same machine execute commands normally at the same time. A verified full app restart (all processes recreated) does not fix it — re-fired runs stall identically. Single-line commands sometimes succeed; multi-line/heredoc commands hang most reliably. Windows 11 Home, local (not cloud/dispatch) routines, project permissions include a blanket Bash allow.
What Should Happen?
Scheduled-task (routine) sessions should execute shell commands the same way interactive sessions do — the command spawns, returns a result, and if it ever hangs, the Bash tool's 2-minute timeout should fire instead of the session sitting in "running" forever.
Error Messages/Logs
No error output — the tool call simply never returns and no timeout fires.
Steps to Reproduce
- On the Windows desktop app, create a scheduled task (routine) whose work requires running shell commands.
- Let it fire on schedule, or press "Run now."
- The session starts, produces its opening response, and executes its first simple one-line Bash command successfully.
- On the 2nd Bash tool call (multi-line/heredoc commands reproduce most reliably), the session freezes: no OS process is created, no tool result is returned, no timeout fires, and the session shows "running" indefinitely.
- Interactive sessions run the identical commands successfully on the same machine at the same time.
Observed on every scheduled run since 6/30 (5+ consecutive nights, 3 different tasks). Restarting the app (verified via process creation times) does not change the behavior.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
Unknown version number — scheduled runs worked nightly through 6/29; first failure 6/30.
Claude Code Version
Desktop app 1.17377.2 (Windows, Microsoft Store build) — standalone claude CLI not installed
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Windows Terminal
Additional Information
Permissions are not the cause (project settings include a blanket Bash allow, and no permission prompt is shown in the stuck sessions). The machine has no WSL installed. Same symptom across 3 different scheduled tasks. Happy to provide session transcripts (.jsonl) on request — each ends with an assistant tool_use entry that never receives a tool_result.