Skip to content

Commit 7529503

Browse files
authored
fix: Replace plan mode "keep planning" with feedback option (#1166)
Closes #1078 1. Replace "No, keep planning" button with "Type here to tell the agent what to do differently" with custom input 2. Use user feedback to deny the plan with context instead of a generic "continue planning" message 3. Interrupt the agent (wait for user input) when no feedback is provided ![Screenshot 2026-03-10 at 11.01.02 AM.png](https://app.graphite.com/user-attachments/assets/25622276-e726-4b75-8a8d-9ace5f9499ac.png)
1 parent b499906 commit 7529503

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

packages/agent/src/adapters/claude/permissions/permission-handlers.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,15 @@ async function applyPlanApproval(
190190
};
191191
}
192192

193-
const message =
194-
"User wants to continue planning. Please refine your plan based on any feedback provided, or ask clarifying questions if needed.";
193+
const customInput = (response._meta as Record<string, unknown> | undefined)
194+
?.customInput as string | undefined;
195+
const feedback = customInput?.trim();
196+
197+
const message = feedback
198+
? `User rejected the plan with feedback: ${feedback}`
199+
: "User rejected the plan. Wait for the user to provide direction.";
195200
await emitToolDenial(context, message);
196-
return { behavior: "deny", message, interrupt: false };
201+
return { behavior: "deny", message, interrupt: !feedback };
197202
}
198203

199204
async function handleEnterPlanModeTool(

packages/agent/src/adapters/claude/permissions/permission-options.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,9 @@ export function buildExitPlanModePermissionOptions(): PermissionOption[] {
105105
},
106106
{
107107
kind: "reject_once",
108-
name: "No, keep planning",
109-
optionId: "plan",
108+
name: "No, and tell the agent what to do differently",
109+
optionId: "reject_with_feedback",
110+
_meta: { customInput: true },
110111
},
111112
];
112113
}

0 commit comments

Comments
 (0)