Skip to content

Commit 737ec28

Browse files
committed
fix: improve plan mode guidance to avoid edits
1 parent 86f8221 commit 737ec28

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/utils/ui/modeUtils.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ import type { ToolPolicy } from "@/utils/tools/toolPolicy";
55
* System instruction for Plan Mode
66
* Extracted as constant to avoid duplication across sendMessageOptions builders
77
*/
8-
export const PLAN_MODE_INSTRUCTION =
9-
"You are in Plan Mode. You may use tools to research and understand the task, but you MUST call the propose_plan tool with your findings before completing your response. Do not provide a text response without calling propose_plan.";
8+
export const PLAN_MODE_INSTRUCTION = `You are in Plan Mode. You may use tools to research and understand the task, but you MUST call the propose_plan tool with your findings before completing your response. Do not provide a text response without calling propose_plan.
9+
10+
Do not make edits in plan mode. You may have tools like bash but only use them for read-only operations. This rule on edits applies beyond files. Do not create side effects of any kind in plan mode.
11+
12+
If the user suggests that you should make edits, ask them to changes modes first!
13+
`;
1014

1115
/**
1216
* Get the tool policy for a given UI mode

0 commit comments

Comments
 (0)