[BUG] Agent team is not terminated after Claude informs that the team has been terminated
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?
When I am using the teammate and it opens several panels with different instances of Claude Code, after finishing the job, the orchestrator agent says that the teams have been shut down, some instances are actually shut down, while others are not, so it stays in an infinite loop in run.
In image 1, the orchestrator agent reports that the team has been shut down, but in image 2, you can see that some instances have actually been closed while others have not. Meanwhile, in image 3, you can see Claude running in a loop after finishing.
<img width="1920" height="1035" alt="Image" src="https://github.com/user-attachments/assets/ccdf3603-3eef-4c4b-90e6-914cea60b521" />
<img width="1920" height="1030" alt="Image" src="https://github.com/user-attachments/assets/8d7f5f88-2646-4a6e-aa36-bd9eb28f1099" />
<img width="1920" height="1033" alt="Image" src="https://github.com/user-attachments/assets/9885afc2-e254-4268-a6b6-9a24f1f3e529" />
What Should Happen?
After finishing the job, the orchestrator agent closes all instances, kills the team, ensures that the tmux panels have been killed, and then returns the output to the user informing them that the team has been terminated.
Error Messages/Logs
Steps to Reproduce
When I use Teammate
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.56
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗