gemini-cli - ✅(Solved) Fix [UX] No visible acknowledgment that a steering hint was received until the model replies [1 pull requests, 1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

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
google-gemini/gemini-cli#26485Fetched 2026-05-06 06:36:19
View on GitHub
Comments
1
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
commented ×1cross-referenced ×1labeled ×1

When a user provides a steering hint during an active turn, there is no immediate UI indication that the hint was received and applied. The user must wait for the model to organically acknowledge the steering in its next response, which can be slow, omitted, or — per #21508 — leak the internal instruction text back to the user.

Root Cause

  • Latency feedback: hints submitted near a tool call may not be reflected in user-visible output for several seconds; without an acknowledgment, the user has no signal whether they should resubmit.
  • Robustness to model echo bugs: when the model misbehaves and echoes the internal steering prompt verbatim (#21508), the user is left without any well-formed acknowledgment of their hint at all.
  • Discoverability: new users are unsure whether the hint feature even works on the current turn.

Fix Action

Fixed

PR fix notes

PR #26498: feat(cli): show acknowledgment when user steering hint is processed

Description (problem / solution / changelog)

Refs #26485

Summary

When a user submits a steering hint mid-turn, today the CLI silently splices the hint into the conversation and the user gets no visible feedback that the hint registered until the model itself acknowledges it — which can be slow, may be omitted, or per #21508 may even leak the internal steering instruction back to the user.

This PR adds an immediate, fast acknowledgment line rendered in the transcript right after the hint is submitted (e.g. · Understood. Focusing on .txt files.), generated by the existing fast-ack helper in parallel with the main turn.

Changes

packages/core/src/utils/fastAckHelper.ts

  • generateSteeringAckMessage accepts an optional signal so callers can cancel the ack generation when the user aborts the active turn.
  • Sanitize inputs flowing through <user_input> / <background_output> wrappers to escape both XML close tags and ] context-breakers, preventing prompt-injection through these helpers.
  • Short-circuit and return the fallback when the parent signal is already aborted.
  • Remove the abort listener in a finally block to avoid leaking it across cancelled turns.

packages/cli/src/ui/hooks/useGeminiStream.ts

  • Fire generateSteeringAckMessage in parallel with the steering hint injection. Render the result as an info-type history item with a captured timestamp so it lands in the correct chronological position.
  • Propagate the active turn's abort signal; drop the ack silently if the turn is cancelled before it resolves.
  • Catch promise rejection (filtering AbortError) since the ack is non-critical UI feedback.

Tests

  • fastAckHelper.test.ts: closing-tag escaping for all three wrappers, ] escaping for hint and background output, listener cleanup verification, and immediate-fallback on a pre-aborted signal.
  • Drive-by: fix a broken 'src/telemetry/llmRole.js' import path so the suite can be loaded under workspace tooling.

Prior reviewer feedback addressed

This is split out of #22619 (closed for inactivity). Every previously- flagged issue is addressed here:

  • ✅ unhandled promise rejection on the ack call (#22619 review 1)
  • ✅ propagate AbortSignal; capture submit timestamp (#22619 review 3)
  • ✅ guard addItem on signal.aborted (#22619 review 4)
  • ✅ handle pre-aborted parent signal (#22619 review 4)
  • ✅ escape ] and other context-breakers, not just </tag> (#22619 review 5)
  • ✅ remove abort listener in finally to fix leak (#22619 review 5)

Test plan

  • vitest run packages/core/src/utils/fastAckHelper.test.ts — 17/17 pass
  • tsc --noEmit clean for @google/gemini-cli-core and @google/gemini-cli
  • Manual: submit a steering hint mid-task and confirm the · acknowledgment line appears in the transcript before the model responds, with reasonable interpretation of the hint
  • Manual: submit a hint, immediately cancel (Ctrl+C); confirm no ghost ack line appears after cancellation

🤖 Generated with Claude Code

Changed files

  • packages/cli/src/test-utils/fixtures/steering.responses (modified, +1/-0)
  • packages/cli/src/ui/hooks/useGeminiStream.ts (modified, +36/-0)
  • packages/core/src/utils/fastAckHelper.test.ts (modified, +126/-1)
  • packages/core/src/utils/fastAckHelper.ts (modified, +26/-5)
RAW_BUFFERClick to expand / collapse

Summary

When a user provides a steering hint during an active turn, there is no immediate UI indication that the hint was received and applied. The user must wait for the model to organically acknowledge the steering in its next response, which can be slow, omitted, or — per #21508 — leak the internal instruction text back to the user.

Current behavior

  1. User submits a hint mid-task.
  2. The CLI silently injects buildUserSteeringHintPrompt(...) into the conversation as the next user turn.
  3. The visible UI does not change until the model produces text on the next response chunk. There is no confirmation that the hint was registered.

Expected behavior

A short, immediate acknowledgment line appears in the transcript as soon as the hint is submitted, stating in plain terms what the agent understood from the hint (e.g. `· Understood. focus on .txt files`). This gives the user a concrete signal that the hint was received and how it was interpreted, independent of whether the model itself echoes or acknowledges the steering.

Why this matters

  • Latency feedback: hints submitted near a tool call may not be reflected in user-visible output for several seconds; without an acknowledgment, the user has no signal whether they should resubmit.
  • Robustness to model echo bugs: when the model misbehaves and echoes the internal steering prompt verbatim (#21508), the user is left without any well-formed acknowledgment of their hint at all.
  • Discoverability: new users are unsure whether the hint feature even works on the current turn.

Proposed approach (high level)

Generate a short acknowledgment via a fast/cheap model in parallel with the main turn, render it as a non-tool-call info line, and ensure it is properly cancelled when the turn is aborted. Sanitize hint text to prevent prompt-injection through the acknowledgment helper's own prompt.

Related

  • #21508 — model echoes the internal steering instruction verbatim
  • #26133 — cancel does not clear pending hint buffer

extent analysis

TL;DR

Implement a fast and cheap model to generate an immediate acknowledgment for steering hints, rendering it as a non-tool-call info line in the transcript.

Guidance

  • To address the latency feedback issue, consider adding a short acknowledgment line to the transcript as soon as the hint is submitted, stating what the agent understood from the hint.
  • Sanitize the hint text to prevent prompt-injection through the acknowledgment helper's own prompt, ensuring the security of the system.
  • Investigate using a parallel processing approach to generate the acknowledgment, allowing for a fast and cheap model to run concurrently with the main turn.
  • Review related issues, such as #21508 and #26133, to ensure that the proposed solution does not introduce new problems or exacerbate existing ones.

Example

No code snippet is provided due to the high-level nature of the proposed approach.

Notes

The solution may require significant changes to the existing system, including the implementation of a new model and modifications to the UI rendering logic. Additionally, the proposed approach may need to be adapted to accommodate specific requirements and constraints of the system.

Recommendation

Apply a workaround by implementing the proposed approach, as it addresses the key issues of latency feedback, robustness to model echo bugs, and discoverability. This approach provides a concrete signal to the user that the hint was received and interpreted, independent of the model's response.

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…

FAQ

Expected behavior

A short, immediate acknowledgment line appears in the transcript as soon as the hint is submitted, stating in plain terms what the agent understood from the hint (e.g. `· Understood. focus on .txt files`). This gives the user a concrete signal that the hint was received and how it was interpreted, independent of whether the model itself echoes or acknowledges the steering.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

gemini-cli - ✅(Solved) Fix [UX] No visible acknowledgment that a steering hint was received until the model replies [1 pull requests, 1 comments, 1 participants]