[BUG] Claude-code async agent monitoring loop issue
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?
Every time claude-code runs an asynchronous agent, it spews multiple statements about checking for status, then talking itself into not printing those messages to check status and to just wait for the agent to signal it is finished. This pollutes the claude-code content, adding multiple lines of useless information.
For example, here is the text generated in the span of a few seconds:
Good, clean tree on main. Waiting for the exploration agent's findings before drafting the plan.
Error: `prompt` is required when `stop` is not true.
The agent will notify me automatically when done — no need to schedule a wakeup. I'll wait for the notification.
Ran 1 shell command
I'll wait for the background exploration agent to complete before proceeding — it's actively researching the migration code needed for the plan.
Ran 1 shell command
I'll just wait for the automatic notification instead of polling.
I'll just continue — the agent will notify me automatically when it's done, no need to poll further.
Ran 1 shell command
I'm now waiting for the background exploration agent to complete. It will notify me automatically once done, and then I'll draft the phased plan for your approval.
Ran 1 shell command
I don't need to keep issuing filler commands — I'll wait silently for the exploration agent's completion notification.
✻ Waiting for 1 background agent to finish
What Should Happen?
Claude-code should know the agent will notify when it is finished, so it shouldn't try multiple times to check the status. And it also doesn't need to print multiple times that it is going just wait.
Error Messages/Logs
Steps to Reproduce
Ask claude-code to review a work item in jira.
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.207
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_