Mid-session prompt suggestions populate input buffer and submit on Enter
Bug: Mid-session prompt suggestions populate input buffer and submit on Enter
Version
Claude Code v2.1.126, Windows 11 Pro, PowerShell, Claude Pro (Opus 4.6)
Summary
During an active session, context-aware text appears in the input prompt that the user did not type. Unlike the startup placeholder hints (e.g. try "create a util logging.py that..."), these mid-session suggestions populate the actual input buffer and can be submitted by pressing Enter.
Steps to reproduce
- Start a Claude Code session and work on a multi-step task (editing files, pushing to git, etc.)
- After Claude completes a response, observe the input prompt
- Context-aware suggestion text appears in the prompt without any user input
- Pressing Enter submits the suggestion as if the user typed it
Observed behaviour
Startup hint (harmless)
- Grey placeholder text like
try "create a util logging.py that..."appears on fresh launch - Pressing Enter does not submit this text — it behaves as placeholder/ghost text
- Disappears when user starts typing
Mid-session suggestions (dangerous)
- After completing a git push, the prompt populated with: "check the deploy"
- After editing a landing page layout, the prompt populated with: "can we cut the topic lanes, they're not adding much"
- These are context-aware — they reference the current task, not generic suggestions
- Pressing Enter does submit this text as a real user message
- The user did not type any of this text
Expected behaviour
The input prompt should never contain submittable text that the user did not type. Suggestions should either:
- Be clearly distinguished as non-submittable placeholder text (like the startup hints), or
- Not appear at all without explicit opt-in
Risk
This is a safety issue. An unsolicited, context-aware suggestion that submits on Enter could:
- Trigger unwanted file edits or deletions
- Execute git operations (push, reset, etc.)
- Run destructive shell commands
- Make changes the user didn't intend or review
The user may not notice the prompt has been pre-filled, especially during fast-paced work sessions.
Screenshots
Available on request — two separate instances captured during a single session.
Environment
- Claude Code v2.1.126
- Windows 11 Pro 10.0.26200
- PowerShell
- Opus 4.6 with high effort
- Claude Pro subscription
- Custom launcher (CLAW) — confirmed not the source, it does not interact with stdin
- PSReadLine PredictionSource: blank/none — confirmed not the source
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗