-
Notifications
You must be signed in to change notification settings - Fork 222
ExitPlanMode no longer sends plan content to ACP client #450
Description
Summary
Since v0.22.0 (commit be618f5), the ExitPlanMode tool call no longer includes the plan text in the content array. This means ACP clients can't show the plan to the user when asking for approval — the user sees "Ready to code?" with approve/reject buttons but has no way to read the actual plan.
We noticed this in the Fabriqa app where our plan approval UI was rendering an empty card.
What changed
In src/tools.ts, the toolInfoFromToolUse() function for ExitPlanMode was simplified during the "Switch over to built-in Claude Code tools" refactor (#316). The plan content mapping was accidentally dropped:
Before (working):
case "ExitPlanMode":
return {
title: "Ready to code?",
kind: "switch_mode",
content:
input && input.plan
? [{ type: "content", content: { type: "text", text: input.plan } }]
: [],
};After (broken):
case "ExitPlanMode": {
return {
title: "Ready to code?",
kind: "switch_mode",
content: [],
};
}The plan text is still available in rawInput.plan on the request_permission call, but the content[] array — which is the standard ACP way for clients to display tool call details — is now always empty.
Expected behavior
When the agent calls ExitPlanMode, the tool_call and request_permission events should include the plan markdown in content[] so ACP clients can render it inline with the approval buttons.
Steps to reproduce
- Start a session in plan mode
- Let the agent create a plan and call
ExitPlanMode - Observe that the
tool_callevent hascontent: [] - The
request_permissionevent'stoolCall.contentis also[]
The fix should be restoring the original input.plan → content mapping in the ExitPlanMode case of toolInfoFromToolUse().