From 4c02d9f0a37b2b72b799299f04dadde9e41c1d21 Mon Sep 17 00:00:00 2001 From: yinlixin Date: Thu, 28 May 2026 13:45:51 +0800 Subject: [PATCH] fix: tighten permission_suggestions type from list[Any] to list[dict[str, Any]] The wire protocol delivers raw JSON objects (plain dicts) for each permission suggestion. list[Any] suppressed all type-checking on consumers of this field. list[dict[str, Any]] accurately reflects the wire format and restores type-checker coverage. Closes #957 --- src/claude_agent_sdk/types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/claude_agent_sdk/types.py b/src/claude_agent_sdk/types.py index ee925b35..b4a02882 100644 --- a/src/claude_agent_sdk/types.py +++ b/src/claude_agent_sdk/types.py @@ -390,7 +390,7 @@ class PermissionRequestHookInput(BaseHookInput, _SubagentContextMixin): hook_event_name: Literal["PermissionRequest"] tool_name: str tool_input: dict[str, Any] - permission_suggestions: NotRequired[list[Any]] + permission_suggestions: NotRequired[list[dict[str, Any]]] # Union type for all hook inputs