claude-code-sdk-python/tests
Lina Tawfik 2acb0a68b1
Fix bypassPermissions silent failure (Issue #30)
When permission_mode='bypassPermissions' is used but the CLI cannot
honor it (due to root user, disabled settings, or CLI version issues),
the SDK would fail silently - the async iterator would complete without
yielding any messages, appearing as "no response" to users.

This commit adds comprehensive error detection:
- Tracks whether any output was received from the CLI
- Detects specific error messages in stderr
- Provides clear, actionable error messages for each failure mode
- Adds --debug flag when using bypassPermissions for better diagnostics
- Updates entrypoint to 'sdk-cli' for better CLI integration

The fix transforms silent failures into helpful errors that explain
what went wrong and how to fix it.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-01 18:27:26 -07:00
..
conftest.py Initial Python SDK import 2025-06-12 00:16:19 -07:00
test_client.py Fix tests to match updated ResultMessage type 2025-06-17 16:51:28 -07:00
test_errors.py Initial Python SDK import 2025-06-12 00:16:19 -07:00
test_integration.py Fix tests to match updated ResultMessage type 2025-06-17 16:51:28 -07:00
test_subprocess_buffering.py chore: Remove obvious comments from code 2025-06-30 22:27:48 -07:00
test_transport.py Fix bypassPermissions silent failure (Issue #30) 2025-07-01 18:27:26 -07:00
test_types.py Fix tests to match updated ResultMessage type 2025-06-17 16:51:28 -07:00