[DOCS] TypeScript and Python SDKs document contradictory defaults for `allowedTools`
Documentation Type
Incorrect/outdated documentation
Documentation Location
https://platform.claude.com/docs/en/agent-sdk/typescript#options
https://platform.claude.com/docs/en/agent-sdk/python#claudeagentoptions
Section/Topic
Options tables in both SDK reference pages, specifically the allowedTools/allowed_tools row.
Current Documentation
TypeScript SDK (typescript.md line 100):
| Property | Type | Default | Description |
|----------|------|---------|-------------|
| allowedTools | string[] | All tools | List of allowed tool names |
Python SDK (python.md line 493):
| Property | Type | Default | Description |
|----------|------|---------|-------------|
| allowed_tools | list[str] | [] | List of allowed tool names |
What's Wrong or Missing?
The SDKs document contradictory default behaviors:
- TypeScript: Defaults to "All tools" — permissive, all tools available
- Python: Defaults to
[]— restrictive, no tools pre-approved
This inconsistency creates several problems:
- Cross-language confusion: Developers porting code between languages will get different behavior
- Security implications: "All tools" is permissive;
[]is restrictive — opposite security postures - Unclear intent: Is the SDK meant to be secure-by-default or easy-to-use-by-default?
Suggested Improvement
Standardize the default across both SDKs. Two options:
Option A: Secure-by-default (both default to [])
TypeScript fix:
| allowedTools | string[] | [] | List of allowed tool names |
Option B: Permissive-by-default (both default to all tools)
Python fix:
| allowed_tools | list[str] | All tools | List of allowed tool names |
Either approach is valid, but the current inconsistency should be resolved.
Impact
Medium - Makes feature difficult to understand
Additional Context
Affected Pages:
| Page | Line(s) | Context |
|------|---------|---------|
| https://platform.claude.com/docs/en/agent-sdk/typescript | 100 | Options table shows "All tools" default |
| https://platform.claude.com/docs/en/agent-sdk/python | 493 | Options table shows [] default |
Total scope: 2 pages affected
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗