Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/claude_agent_sdk/_internal/transport/subprocess_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -891,14 +891,14 @@ async def close(self) -> None:
try:
with anyio.fail_after(5):
await self._process.wait()
except TimeoutError:
except (TimeoutError, getattr(anyio, "TimeoutError", TimeoutError)):
# Graceful shutdown timed out β€” force terminate
with suppress(ProcessLookupError):
self._process.terminate()
try:
with anyio.fail_after(5):
await self._process.wait()
except TimeoutError:
except (TimeoutError, getattr(anyio, "TimeoutError", TimeoutError)):
# SIGTERM handler blocked β€” force kill (SIGKILL)
with suppress(ProcessLookupError):
self._process.kill()
Expand Down