[BUG] Agent restarts work on its own, even after interruption
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?
Claude Code restarts working on its own if an old process finishes work, even after manually interrupting the work. This happens even if you stopped and restarted the process in the meantime.
Here's a case where I had a process running in the background in the previous session, interrupted the model, closed the app, restarted it and just waited without any input at all:
<img width="1184" height="414" alt="Image" src="https://github.com/user-attachments/assets/00b08a17-3ec6-469e-b706-e251e6956d0d" />
What Should Happen?
App shouldn't start any work on its own, ever.
Especially when idle, since that results in extra API costs without user input.
Error Messages/Logs
Steps to Reproduce
- Run a prompt that will result in a long-running background process
- Exit cloud code
- Start it again and wait
- When the process finishes, claude will start running more prompts on its own
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.76
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗