claude-code - 💡(How to fix) Fix Mid-session prompt suggestions populate input buffer and submit on Enter [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#56142Fetched 2026-05-05 05:57:06
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×3commented ×2cross-referenced ×1

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.

Root Cause

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.

RAW_BUFFERClick to expand / collapse

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

  1. Start a Claude Code session and work on a multi-step task (editing files, pushing to git, etc.)
  2. After Claude completes a response, observe the input prompt
  3. Context-aware suggestion text appears in the prompt without any user input
  4. 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

extent analysis

TL;DR

Disable or modify the context-aware suggestion feature to prevent it from populating the input buffer with submittable text.

Guidance

  • Investigate the Claude Code configuration to see if there's an option to disable or customize the mid-session suggestions.
  • Check if there's a way to distinguish suggested text from user-typed text, such as using a different color or formatting.
  • Consider filing a bug report with the Claude Code developers to request a fix for this safety issue.
  • As a temporary workaround, users can be advised to always review the input prompt before pressing Enter.

Example

No code snippet is provided as the issue is related to the behavior of the Claude Code application.

Notes

The root cause of the issue is likely related to the implementation of the context-aware suggestion feature in Claude Code. Without access to the code or more information about the feature, it's difficult to provide a more specific solution.

Recommendation

Apply workaround: Disable or modify the context-aware suggestion feature until a fix is available from the developers, as this is a safety issue that can cause unintended actions.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Mid-session prompt suggestions populate input buffer and submit on Enter [2 comments, 2 participants]