[BUG] Session keeps sending "waiting for task" messages autonomously, consuming tokens
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?
After completing a task, the Claude Code session continues sending unprompted
messages autonomously ("Waiting for a task.", "Paused — won't continue without
a specific task.", etc.) roughly every few minutes — without any user input.
This happened while I was asleep with the session left open. The session consumed
~40% of the context window token budget sending ~15+ identical "waiting" messages.
Actual messages from session log:
Waiting for a task. Waiting for a task — won't continue without one. Paused. Waiting for your instructions. Waiting for a task.
(repeated ~15 times over several hours)
What Should Happen?
After completing a task and sending a final summary, Claude should go completely
silent and wait without sending any additional messages until the user writes something.
Error Messages/Logs
No error messages. The session silently consumed ~40% of context window tokens
with zero useful work while the user was away.
Steps to Reproduce
- Open Claude Code (web or desktop app on macOS)
- Complete a multi-step coding task
- Claude sends final summary: "Done, waiting for next task"
- Leave the session open without interacting (computer may enter sleep mode)
- Return after several hours — observe that Claude sent 10-15+ unprompted
"waiting for task" messages with no user input
Claude Model
None
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
unknown
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
Claude Code desktop app + Claude Code web (claude.ai/code)
Reproduced on two separate platforms:
- Claude Code web (claude.ai/code) — browser tab left open
- Claude Code desktop app (Mac mini M4, macOS) — app left open
This suggests the issue is in the core session loop, not platform-specific.
Impact: significant token waste, session becomes unusable when context fills up,
happens silently while user is away with no way to prevent it without manually
closing every session after each task.