Mid-session prompt suggestions populate input buffer and submit on Enter

Status Fixed / completed
Maintainer reply None cached
Activity 5 comments · opened May 4, 2026 · closed May 7, 2026

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

View original on GitHub ↗

5 Comments

github-actions[bot] · 5 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/25787
  2. https://github.com/anthropics/claude-code/issues/18106
  3. https://github.com/anthropics/claude-code/issues/20439

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

GavinViney · 5 months ago

Adding context from the linked duplicates — this is a recurring issue that keeps getting auto-closed without resolution.

#25787 documents the core UX problem thoroughly: Enter simultaneously accepts and executes suggestions, violating CLI conventions (Fish, Zsh, Bash, GitHub Copilot CLI all require Tab/Arrow acceptance before Enter executes). That issue itself references two earlier reports (#14500, #16166) that were also auto-closed.

#20439 demonstrates real-world damage: an autocomplete suggestion of "merge it" was accidentally submitted when the user pasted a screenshot, causing a PR to be merged without user intent.

My report adds a new dimension — context-aware suggestions appearing mid-session that populate the actual input buffer. These aren't generic placeholder hints. After a git push, "check the deploy" appeared. After editing a landing page, "can we cut the topic lanes, they're not adding much" appeared. Both were submittable on Enter.

This has been reported independently by multiple users across macOS, Linux, and now Windows since at least January 2026. The proposed fix in #25787 (decouple acceptance from execution via a tab_accepts config option) is clean and non-breaking. Please don't let the auto-close bot bury this again.

jhawkzz · 5 months ago

Still reproduces on Claude Code v2.1.141 (latest as of 2026-05-13).

Environment

  • Claude Code: 2.1.141
  • OS: Windows Server 2019 Datacenter, 10.0.17763
  • Shell: Windows PowerShell 5.1 (powershell.exe)
  • Settings: minimal — autoUpdatesChannel, skipAutoPermissionPrompt, custom spinnerVerbs. No hooks, no statusLine, no

plugins, no env overrides that touch the input box.

Same symptoms as the original report: a startup placeholder is harmless, but mid-session the input gets pre-populated
with context-aware text (referencing the just-completed tool calls / file edits) that does submit on Enter. Nothing
local can be removed to disable it — there's no setting that controls it.

Bumping because this is still a safety issue: with skipAutoPermissionPrompt on, an accidental Enter on an injected
"push the branch" or "reset to main" runs without a confirmation gate.

bizzyjb · 4 months ago

I am also experiencing this. One thing that I haven't seen anyone mention is how it PERSISTS when you start typing and completely mangled your text.

It doesn't submit mangled text, but it sure does make it hard to read when you're typing!

github-actions[bot] · 2 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.