docs: fix dontAsk and auto permission_mode descriptions#863
Conversation
The dontAsk description was inverted — it said 'Allow all tools without prompting', which is what bypassPermissions does. dontAsk actually denies any tool call that isn't pre-approved by allow rules. Also clarified that auto mode uses a model classifier to approve or deny each tool call, rather than the vague 'automatically determine'.
There was a problem hiding this comment.
LGTM — docstring-only fix, no behavior change.
Extended reasoning...
Overview
This PR updates two docstring lines each in src/claude_agent_sdk/client.py (set_permission_mode) and src/claude_agent_sdk/query.py (query). It corrects the description of dontAsk (previously duplicated the bypassPermissions description and implied permissive behavior) and clarifies auto. Four lines changed in total, all inside docstrings.
Security risks
None. No executable code paths are touched — the PermissionMode literal in types.py and the pass-through to the CLI control protocol are unchanged. This cannot affect runtime permission enforcement.
Level of scrutiny
Low. This is a comment/documentation correction with a well-argued rationale in the PR description. The Python SDK doesn't implement the mode semantics itself (it forwards the string to the CLI), so there's no local logic to cross-check; the new wording is internally consistent (distinguishes dontAsk from bypassPermissions) where the old wording was not.
Other factors
No bugs flagged by the bug-hunting system, no prior reviewer comments, and the change is symmetric across both call sites. Straightforward to approve.
Summary
Fixes two misleading lines in the
permission_modedocstrings (client.pyandquery.py).dontAsk— the description was inverted. It said:That's what
bypassPermissionsdoes.dontAskactually converts any would-be permission prompt into a deny — only tools pre-approved by allow rules run. Someone reading the old docstring could reasonably pickdontAskexpecting permissive behavior and get the opposite.auto— "Automatically determine permission mode" was vague. Clarified that it uses a model classifier to approve or deny each tool call.Changes
src/claude_agent_sdk/client.py—set_permission_mode()docstringsrc/claude_agent_sdk/query.py—query()docstringDocstring-only, no behavior change.