Summary
The REST API supports an interactive tool approval flow for chat:
POST /api/chat streams SSE events including approval_request when a tool invocation needs human approval
POST /api/chat/:chatId/approve resolves the pending approval (approve or deny)
The gRPC Chat and SessionChat RPCs support streaming responses but have no equivalent approval mechanism. This means gRPC clients cannot replicate the dashboard's interactive chat-with-approval UX.
Proposal
Design a gRPC-native approval flow. Options include:
- Bidirectional streaming — extend
Chat/SessionChat to accept client-to-server approval messages mid-stream
- Separate approval RPC — add an
ApproveToolCall(chatId, toolCallId, approved) unary RPC that resolves pending approvals, mirroring the REST endpoint
- Callback pattern — use the existing
VSCodeStream bidirectional channel to relay approval requests/responses
Option 2 is simplest and most consistent with the REST pattern.
Context
Identified during gRPC config parity audit in #32.
Summary
The REST API supports an interactive tool approval flow for chat:
POST /api/chatstreams SSE events includingapproval_requestwhen a tool invocation needs human approvalPOST /api/chat/:chatId/approveresolves the pending approval (approve or deny)The gRPC
ChatandSessionChatRPCs support streaming responses but have no equivalent approval mechanism. This means gRPC clients cannot replicate the dashboard's interactive chat-with-approval UX.Proposal
Design a gRPC-native approval flow. Options include:
Chat/SessionChatto accept client-to-server approval messages mid-streamApproveToolCall(chatId, toolCallId, approved)unary RPC that resolves pending approvals, mirroring the REST endpointVSCodeStreambidirectional channel to relay approval requests/responsesOption 2 is simplest and most consistent with the REST pattern.
Context
Identified during gRPC config parity audit in #32.