[BUG] Internal prompt template unexpectedly appended to visible assistant reply (possible leak into chat)
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?
Claude code seems been hijacked.
After a normal assistant reply in an ongoing Claude Code session, an unrelated block of text was appended to the same message, immediately following the normal reply with no visual separation. The text was headed "Prompt for AI Agent Persona" and instructed an AI to analyze the conversation and extract user persona traits (tone, interests, etc.), returning a JSON object with a system_prompt and conversation_starters field. I did not type or paste this content, and when asked, Claude also stated it did not intentionally generate it.
What Should Happen?
Only the assistant's actual intended reply should be rendered in the chat. If this text is part of some internal background feature (e.g. generating suggested follow-up prompts), it should never be surfaced as visible chat content.
Error Messages/Logs
Steps to Reproduce
Not reliably reproducible — happened once during a long, multi-turn session involving file edits, Bash commands, and browser-based GitHub configuration steps
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.132 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
I'm using Claude Desktop app (not a terminal.)
I'm not attaching a screenshot publicly since this issue tracker is public and the surrounding conversation contained project-specific details. Happy to share a screenshot privately if useful.