claude-code - 💡(How to fix) Fix [BUG] Monitor tool output re-injected as user input (variant of #57966)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error Messages/Logs

Code Example

Sequence of events (terminal output):
43.8%Want me to drop to 60s updates since the interesting part is confirmed?
Monitor event: "Sheet 3 re-run - watching for J-prefix heaters"
Yes please drop to 60s.     appeared as user message; Claude acted on it
Stop Task
Monitor(Sheet 3 re-run - 60s progress)
Switched to 60s.

User confirmed via shell ↑ history they had not typed "Yes please drop to 60s."
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

During a session with an active Monitor polling loop, a string that Claude had just output appeared as a user message in the next turn, and Claude acted on it as if the user had typed it. This is a Monitor-tool variant of #57966 (Agent tool prompt re-injection).

What Should Happen?

Claude's own output should never be injected back as a user message. Only text the user explicitly types should appear as user input.

Error Messages/Logs

Sequence of events (terminal output):
43.8% — Want me to drop to 60s updates since the interesting part is confirmed?
● Monitor event: "Sheet 3 re-run - watching for J-prefix heaters"
● Yes please drop to 60s.    ← appeared as user message; Claude acted on it
● Stop Task
● Monitor(Sheet 3 re-run - 60s progress)
● Switched to 60s.

User confirmed via shell ↑ history they had not typed "Yes please drop to 60s."

Steps to Reproduce

  1. Start a Monitor polling loop with a short interval (5s)
  2. Claude responds with a yes/no question in the same turn
  3. A monitor event notification arrives immediately after Claude's response
  4. Observe: Claude's own response text appears as the next user message

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.111 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

#57966 documents the same behavior triggered by the Agent tool. This suggests the re-injection bug affects multiple tool types (Agent, Monitor, possibly others). The injected text caused Claude to take an unintended action (changing monitor interval). If the injected text had been a destructive command the impact could be more serious.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Monitor tool output re-injected as user input (variant of #57966)