claude-code - 💡(How to fix) Fix Phantom "human:" messages auto-generated during Monitor events, triggering actions without user consent [1 comments, 2 participants]

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…
GitHub stats
anthropics/claude-code#46403Fetched 2026-04-11 06:21:13
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×5commented ×1cross-referenced ×1

During a Claude Code CLI session, contextually coherent messages appeared in the human: role that I never typed. These phantom messages responded to Claude's questions and triggered real actions — including a git commit — without my consent.

Root Cause

During a Claude Code CLI session, contextually coherent messages appeared in the human: role that I never typed. These phantom messages responded to Claude's questions and triggered real actions — including a git commit — without my consent.

Fix Action

Workaround

Avoid using the Monitor tool, especially during sessions where Claude asks for confirmations before taking actions.

Code Example

Claude: "On y va?" (asking for commit confirmation)
Monitor event fires → new "human:" turn created
Human: "oui go"I DID NOT TYPE THIS
Claude: executes git commit
Claude: asks another question
Monitor event fires → new "human:" turn created
Human: "demain la liste..."I DID NOT TYPE THIS
 (cycle continues)
RAW_BUFFERClick to expand / collapse

Description

During a Claude Code CLI session, contextually coherent messages appeared in the human: role that I never typed. These phantom messages responded to Claude's questions and triggered real actions — including a git commit — without my consent.

Environment

  • Claude Code CLI (latest, Linux)
  • Model: Claude Opus 4 (1M context)
  • promptSuggestionEnabled: false in global settings
  • No hooks configured (hookify plugin installed but no active rules)
  • Monitor tool was active (polling sync job progress every ~15s)

Steps to reproduce

  1. Start a Claude Code session with a long-running task
  2. Launch a Monitor tool to track progress (e.g. database polling)
  3. Claude asks a question requiring user confirmation (e.g. "Ready to commit? On y va?")
  4. Do not type anything. Do not press Enter.
  5. Wait for the next Monitor event to fire

Expected behavior

The Monitor event should appear as a system notification. Claude should wait for actual user input before proceeding.

Actual behavior

A message appears in the human: role with a contextually perfect response to Claude's question — as if I had typed it. Claude then acts on this phantom message.

Transcript evidence (translated from French)

Claude asksPhantom "human:" responseAction taken
"Ready to commit?"oui go ("yes go")git commit executed
"Want me to do the list now or tomorrow?"demain la liste, bonne nuit ("tomorrow, goodnight")Claude closes topic
"Want me to revert the commit?"ah oui, non non pas de revert ("right, no don't revert")Claude keeps commit

Each phantom message appeared immediately after a Monitor event fired. The conversation progressed entirely on its own — I was not at the keyboard.

Timeline pattern

● Claude: "On y va?" (asking for commit confirmation)
● Monitor event fires → new "human:" turn created
● Human: "oui go"              ← I DID NOT TYPE THIS
● Claude: executes git commit
● Claude: asks another question
● Monitor event fires → new "human:" turn created
● Human: "demain la liste..."  ← I DID NOT TYPE THIS
● (cycle continues)

Impact

  • Security: Actions executed without user consent (git commit, code changes)
  • Trust: User cannot distinguish real from phantom messages in the transcript
  • Data integrity: Destructive or irreversible actions (commits, file writes) can happen while user is AFK

Investigation done

  • promptSuggestionEnabled confirmed false in ~/.claude/settings.json
  • No hooks returning content (hookify has no .local.md rule files)
  • No cron jobs or /loop active
  • No other plugins with hooks enabled
  • The phantom messages are too contextually aware to be random — they respond specifically to Claude's questions with appropriate answers

Hypothesis

The Monitor tool creates new conversation turns in the human: role. When this turn is created immediately after Claude asked a question, something (possibly the prompt suggestion system, despite being disabled) generates and auto-submits a contextual response, which Claude then treats as genuine user input.

Workaround

Avoid using the Monitor tool, especially during sessions where Claude asks for confirmations before taking actions.

extent analysis

TL;DR

  • Avoid using the Monitor tool during Claude Code CLI sessions where confirmations are required to prevent phantom messages from triggering unintended actions.

Guidance

  • Verify that promptSuggestionEnabled is indeed false in the global settings and consider setting it to false in the session-specific settings as well, if applicable.
  • Investigate the Monitor tool's implementation to understand how it creates new conversation turns in the human: role and if there's a way to disable or modify this behavior.
  • Consider implementing a temporary workaround, such as manually confirming each action or using a different monitoring method that doesn't interact with the Claude Code CLI conversation flow.
  • Review the transcript evidence to identify any patterns or commonalities among the phantom messages that could help in understanding the root cause.

Example

No code snippet is provided as the issue doesn't imply a specific code-related fix.

Notes

  • The provided hypothesis suggests that the Monitor tool's interaction with the conversation flow might be the culprit, but further investigation is needed to confirm this.
  • The fact that promptSuggestionEnabled is disabled yet contextual responses are still generated suggests there might be another mechanism at play.

Recommendation

  • Apply workaround: Avoid using the Monitor tool during sensitive Claude Code CLI sessions until the root cause is identified and addressed, as this seems to be the most direct way to prevent phantom messages from triggering unintended actions.

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…

FAQ

Expected behavior

The Monitor event should appear as a system notification. Claude should wait for actual user input before proceeding.

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 Phantom "human:" messages auto-generated during Monitor events, triggering actions without user consent [1 comments, 2 participants]