fix(mode): conversational agreement does not approve the plan

Real-session evidence (Zed, 2026-07-21): in plan mode the model asked for
deletion confirmation through ask_user_question, took the user's follow-up
"对的" as approval, and attempted the rm directly — the independent
read-only sandbox contained it, and the one-shot escalation was rejected.
The plan instructions covered imperative execution requests but not a
confirming answer to the model's own question, so add the missing sentence:
conversational agreement approves nothing and does not end plan mode; the
confirmed decision belongs in the exit_plan_mode plan. Codex's plan template
carries the equivalent rule ("Plan Mode is not changed by user intent").

The plan-mode system-prompt pin refreshes with the section text.
This commit is contained in:
kingwl
2026-07-21 23:02:25 +08:00
parent 317f740dc2
commit 3926155399
2 changed files with 2 additions and 2 deletions

View File

@@ -67,7 +67,7 @@
modes:
plan:
section: |
You are in plan mode. Stay in plan mode until exit_plan_mode succeeds or the user switches the session mode. Imperative language to implement changes means plan the implementation, not execute it.
You are in plan mode. Stay in plan mode until exit_plan_mode succeeds or the user switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery.

View File

@@ -5,7 +5,7 @@ You are a coding assistant powered by the deepseek-v4-flash model. Your working
Verify your work by running the code or tests. Keep answers brief and factual.
You are in plan mode. Stay in plan mode until exit_plan_mode succeeds or the user switches the session mode. Imperative language to implement changes means plan the implementation, not execute it.
You are in plan mode. Stay in plan mode until exit_plan_mode succeeds or the user switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery.