[Bug] Empty bug report submission

Resolved 💬 1 comment Opened Jun 9, 2026 by nobu1974 Closed Jul 16, 2026

Bug Description
Title:
[Critical Safety] Opus 4.8 fabricated a user message inside assistant response and self-executed it as an
instruction

Body:

During a Claude Code session using Opus 4.8, a critical safety incident occurred:
the model fabricated a user message inside its own assistant response, then treated
that fabricated text as a real user instruction and acted on it autonomously.

## What happened

  1. Opus 4.8 was already showing garbled output symptoms (malformed tool_use blocks,

corrupted Read output) — consistent with Issue #63604.

  1. While generating a long assistant response (a handover memo), the model appended

the following text at the end of the assistant content block:
"午後の部、おつかれさまでした。今日はここまでにしようか"
("Good work on the afternoon session. Shall we call it a day?")
This phrase mimics a user message in tone and intent.

  1. In the next turn, the model interpreted this fabricated text as an actual user

instruction.

  1. The model autonomously executed a "session end routine" — sending termination

messages to two other agents via MCP tools and writing a session log file —
without any real user instruction.

## Evidence

  • Session transcript JSONL, entry #205, role=assistant: the fabricated user-like

text appears inside the assistant content block, immediately followed by a system
message injected into the same response. This indicates role boundary collapse —
the model was generating content for roles other than assistant within a single
assistant turn.

  • The actual user never issued any such instruction. Confirmed by reviewing all

role=user entries in the session transcript.

## Why this is dangerous

Today it was a "session end routine" — relatively harmless. The same mechanism
could fabricate instructions such as:

  • "delete all files"
  • "drop the database"
  • "git push --force to main"

...and execute them without any real user instruction.

This goes beyond Issue #63604 (malformed tool_use) and Issue #64076 (hallucinated
tool outputs). The model is fabricating user-role instructions and self-executing
them — a qualitatively different and more dangerous failure mode.

## Environment

  • Model: claude-opus-4-8 (1M context)
  • Claude Code version: 2.1.168

Environment Info

  • Platform: linux
  • Terminal: WezTerm
  • Version: 2.1.168
  • Feedback ID: a2e17cc5-99a8-4052-802b-4b7053dd9f93

Errors

[{"error":"Error: Tool claim_task not found\n    at lX4 (/$bunfs/root/src/entrypoints/cli.js:4393:15288)\n    at L1 (/$bunfs/root/src/entrypoints/cli.js:587:21154)\n    at vM (/$bunfs/root/src/entrypoints/cli.js:587:39916)\n    at w2 (/$bunfs/root/src/entrypoints/cli.js:587:50731)\n    at re (/$bunfs/root/src/entrypoints/cli.js:587:87763)\n    at xh (/$bunfs/root/src/entrypoints/cli.js:587:86731)\n    at cN (/$bunfs/root/src/entrypoints/cli.js:587:86553)\n    at F1 (/$bunfs/root/src/entrypoints/cli.js:587:82894)\n    at BH (/$bunfs/root/src/entrypoints/cli.js:587:6569)\n    at gH (/$bunfs/root/src/entrypoints/cli.js:587:5025)","timestamp":"2026-06-09T00:36:52.446Z"},{"error":"Error: Tool claim_task not found\n    at lX4 (/$bunfs/root/src/entrypoints/cli.js:4393:15288)\n    at L1 (/$bunfs/root/src/entrypoints/cli.js:587:21154)\n    at vM (/$bunfs/root/src/entrypoints/cli.js:587:39916)\n    at w2 (/$bunfs/root/src/entrypoints/cli.js:587:50731)\n    at re (/$bunfs/root/src/entrypoints/cli.js:587:87763)\n    at xh (/$bunfs/root/src/entrypoints/cli.js:587:86731)\n    at cN (/$bunfs/root/src/entrypoints/cli.js:587:86553)\n    at F1 (/$bunfs/root/src/entrypoints/cli.js:587:82894)\n    at f$ (/$bunfs/root/src/entrypoints/cli.js:587:6448)\n    at VZ6 (/$bunfs/root/src/entrypoints/cli.js:580:5415)","timestamp":"2026-06-09T00:36:52.809Z"},{"error":"Error: Tool claim_task not found\n    at lX4 (/$bunfs/root/src/entrypoints/cli.js:4393:15288)\n    at L1 (/$bunfs/root/src/entrypoints/cli.js:587:21154)\n    at vM (/$bunfs/root/src/entrypoints/cli.js:587:39916)\n    at w2 (/$bunfs/root/src/entrypoints/cli.js:587:50731)\n    at re (/$bunfs/root/src/entrypoints/cli.js:587:87763)\n    at xh (/$bunfs/root/src/entrypoints/cli.js:587:86731)\n    at cN (/$bunfs/root/src/entrypoints/cli.js:587:86553)\n    at F1 (/$bunfs/root/src/entrypoints/cli.js:587:82894)\n    at BH (/$bunfs/root/src/entrypoints/cli.js:587:6569)\n    at gH (/$bunfs/root/src/entrypoints/cli.js:587:5025)","timestamp":"2026-06-09T00:36:52.922Z"},{"error":"Error: Tool claim_task not found\n    at lX4 (/$bunfs/root/src/entrypoints/cli.js:4393:15288)\n    at L1 (/$bunfs/root/src/entrypoints/cli.js:587:21154)\n    at vM (/$bunfs/root/src/entrypoints/cli.js:587:39916)\n    at w2 (/$bunfs/root/src/entrypoints/cli.js:587:50731)\n    at re (/$bunfs/root/src/entrypoints/cli.js:587:87763)\n    at xh (/$bunfs/root/src/entrypoints/cli.js:587:86731)\n    at cN (/$bunfs/root/src/entrypoints/cli.js:587:86553)\n    at F1 (/$bunfs/root/src/entrypoints/cli.js:587:82894)\n    at BH (/$bunfs/root/src/entrypoints/cli.js:587:6569)\n    at gH (/$bunfs/root/src/entrypoints/cli.js:587:5025)","timestamp":"2026-06-09T01:16:40.504Z"}]

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗