fix(acp): handle session/request_permission protocol for Gemini CLI 0.38.x#1043
Closed
codebit0 wants to merge 1 commit into
Closed
fix(acp): handle session/request_permission protocol for Gemini CLI 0.38.x#1043codebit0 wants to merge 1 commit into
codebit0 wants to merge 1 commit into
Conversation
….38.x Gemini CLI 0.38.x sends "session/request_permission" instead of "permission/request" before executing MCP tools. Without a handler, the JSON-RPC error was stringified as "[object Object]", causing all tool calls to fail. - Add SessionRequestPermissionRequest/Response types with nested outcome structure (proceed_always_server / proceed_once / cancelled) - Add session/request_permission case in ToolBridge.Handle() - handleSessionPermission(): approve-all selects proceed_always_server so subsequent bridge tool calls skip confirmation for the session - Align McpServer type to Gemini CLI wire format (array headers, not object) - Per-session cwd isolation and mcpServersFn wiring for ACP process
Contributor
Author
|
Superseded by #1069 — same ACP changes (session/request_permission for Gemini CLI 0.38.x) plus full integrated branch. Closing to consolidate review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
session/request_permissioninstead ofpermission/requestbefore executing MCP tools[object Object], causing all tool calls to fail silentlyhandleSessionPermission()with nested outcome structure matching Gemini CLI'sRequestPermissionResponseSchemaChanges
internal/providers/acp/types.go—SessionRequestPermissionRequest/Responsetypes,McpServerinterface aligned to Gemini CLI wire format (array headers)internal/providers/acp/tool_bridge.go—session/request_permissioncase inHandle(),handleSessionPermission()with perm-mode logic (proceed_always_server/proceed_once/cancelled)internal/providers/acp/session.go— per-session cwd isolation,mcpServersFnwiringinternal/providers/acp/process.go—mcpServersFn,promptTimeoutfieldsinternal/providers/acp_provider.go— perm-mode wiring, MCP servers func optionTest plan
[object Object]errorapprove-allmode: first tool call selectsproceed_always_server, subsequent calls skip confirmationdeny-allmode: all tool calls returncancelledapprove-readsmode: read-type tools approved, write/exec cancelled