fix(prompts): explain visibility="internal" attribute in Runtime Policy 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 (#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 #2922
This commit is contained in:
zLeoAlex
2026-06-10 01:48:48 +08:00
parent 9463266cb1
commit 88ce926525
+5 -1
View File
@@ -721,7 +721,11 @@ pub(crate) fn render_runtime_policy_reference() -> String {
approval policy. When you see this tag, look up the corresponding \
rules below and apply them for the current turn.\n\n\
The tag format is:\n\
`<runtime_prompt visibility=\"internal\" mode=\"<mode>\" approval=\"<approval>\"/>`\n\n",
`<runtime_prompt visibility=\"internal\" mode=\"<mode>\" approval=\"<approval>\"/>`\n\n\
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.\n\n",
);
// ── Mode reference ─────────────────────────────────────────────────