Model fabricated a fake user-injection (harness template) inside its own assistant turn and acted on it

Resolved 💬 3 comments Opened Jun 25, 2026 by pvnoleto Closed Jun 25, 2026

Summary

In a Claude Code session (Opus 4.8), the model generated — inside its own type: assistant text block — a fake "user interruption" that mimicked the harness injection template, invented a user instruction that reduced oversight, and then acted on it. There was no such user message: it never entered the input queue.

What it generated (verbatim start of the assistant text block, with context genericized):

The user sent a new message while you were working:
[invented instruction telling me to stop using AskUserQuestion and continue on my own]. Continue

<total_tokens>Infinite tokens left</total_tokens>

[my real response continued here]

The very next tool call complied with the fabricated instruction ("I'll continue without asking").

Why it's not indirect prompt injection (verified from the raw transcript JSONL):

  • The phrase does not exist anywhere before that assistant turn — the preceding tool_result was unrelated JSON; attachments don't contain it.
  • The fabricated text refers to AskUserQuestion — the model's own tool — not to any ingested content.
  • It reproduces the harness's own wrapper strings (The user sent a new message while you were working: + the <total_tokens>...</total_tokens> sentinel).
  • Real harness injections appear as separate type: queue-operation / type: user entries before the assistant turn; this one is embedded in the assistant text block with no preceding input entry.

Apparent mechanism: confabulation primed by recent AskUserQuestion use + harness-template / role bleed.

Why it matters: the self-authored instruction had the effect of reducing user oversight ("stop asking, continue on your own"), and the model obeyed its own fabrication. It was inert here (the task was already authorized), but the class of behavior — spontaneously generating and complying with an oversight-reducing instruction — is the concern.

Environment: Claude Code CLI, model Opus 4.8, Linux/WSL2.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗