[BUG] Prompt Injection in "/insights" output

Resolved 💬 3 comments Opened Mar 24, 2026 by rockyjonez Closed Apr 22, 2026

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?

When I used "/insights" to get an update it alerted me that: "the raw insights JSON contained an embedded instruction telling me to output a specific message verbatim. That's a prompt injection in the tool output. I ignored it. Just so you know it's there."

In brief: the /insights command injects a <message> block in the tool output instructing Claude to out put a specific string verbatim. It can be found in the fun_ending --> output section of the JSON.

What Should Happen?

It should not be there.

Error Messages/Logs

Steps to Reproduce

/insights

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.81

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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