Skip to content

fix(prompts): explain visibility="internal" in Runtime Policy Reference#2951

Merged
Hmbown merged 1 commit into
Hmbown:mainfrom
LeoAlex0:explain-runtime-prompt-visibility
Jun 10, 2026
Merged

fix(prompts): explain visibility="internal" in Runtime Policy Reference#2951
Hmbown merged 1 commit into
Hmbown:mainfrom
LeoAlex0:explain-runtime-prompt-visibility

Conversation

@LeoAlex0

@LeoAlex0 LeoAlex0 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary · 概述

Add an explanation of the visibility="internal" attribute in the Runtime Policy Reference section of the system prompt.

在系统提示的 Runtime Policy Reference 部分添加 visibility="internal" 属性的说明。

Motivation · 动机

The <runtime_prompt> tag has always carried visibility="internal", but the attribute was listed in the tag format without any explanation of what it means. Some models interpreted this as an instruction to announce or restate the current mode to the user, leading to repetitive mode confirmations before every tool call (#2922).

<runtime_prompt> 标签一直带有 visibility="internal" 属性,但 tag 格式中只是列出了它,没有解释含义。部分模型将此理解为需要向用户宣布或重申当前模式,导致每次工具调用前都重复确认模式(#2922)。

Change · 变更

In render_runtime_policy_reference(), add one sentence after the tag format:

The visibility="internal" attribute means this tag is a runtime instruction for the model, not user input. Do not announce the current mode or restate the tag content to the user — just apply the referenced rules silently.

render_runtime_policy_reference() 中,tag 格式之后新增一句说明。

Closes · 关闭

Closes #2922

Files · 涉及文件

  • crates/tui/src/prompts.rsrender_runtime_policy_reference()

…cy Reference

The <runtime_prompt> tag includes a visibility="internal" attribute that
was listed in the tag format but never explained.  Models sometimes
interpreted this as an instruction to announce or restate the current
mode to the user, leading to repetitive YOLO-mode confirmations before
every tool call (Hmbown#2922).

Add a one-sentence explanation: the attribute marks this tag as a
runtime instruction for the model (not user input), and the model should
apply the referenced rules silently without announcing the mode.

Closes Hmbown#2922

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the runtime policy reference prompt in crates/tui/src/prompts.rs to clarify the behavior of the visibility="internal" attribute. It explicitly instructs the model that this tag is an internal runtime instruction and that it should apply the referenced rules silently without announcing the mode or restating the tag content to the user. There are no review comments, and I have no additional feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@LeoAlex0 LeoAlex0 marked this pull request as ready for review June 9, 2026 17:51

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@Hmbown Hmbown merged commit 0475c33 into Hmbown:main Jun 10, 2026
10 checks passed
@Hmbown Hmbown added this to the v0.8.56 milestone Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

QUESTION:agent会在执行操作前反复强调是YOLO模式,这个正常吗

2 participants