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_call event has content: []
- The
request_permission event's toolCall.content is also []
The fix should be restoring the original input.plan → content mapping in the ExitPlanMode case of toolInfoFromToolUse().
Summary
Since v0.22.0 (commit
be618f5), theExitPlanModetool call no longer includes the plan text in thecontentarray. 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, thetoolInfoFromToolUse()function forExitPlanModewas simplified during the "Switch over to built-in Claude Code tools" refactor (#316). The plan content mapping was accidentally dropped:Before (working):
After (broken):
The plan text is still available in
rawInput.planon therequest_permissioncall, but thecontent[]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, thetool_callandrequest_permissionevents should include the plan markdown incontent[]so ACP clients can render it inline with the approval buttons.Steps to reproduce
ExitPlanModetool_callevent hascontent: []request_permissionevent'stoolCall.contentis also[]The fix should be restoring the original
input.plan→ content mapping in theExitPlanModecase oftoolInfoFromToolUse().