Skip to content

fix(transport): avoid cross-task stderr cancel scope#849

Open
MukundaKatta wants to merge 1 commit intoanthropics:mainfrom
MukundaKatta:codex/transport-stderr-asyncio-task
Open

fix(transport): avoid cross-task stderr cancel scope#849
MukundaKatta wants to merge 1 commit intoanthropics:mainfrom
MukundaKatta:codex/transport-stderr-asyncio-task

Conversation

@MukundaKatta
Copy link
Copy Markdown

Summary

  • replace the manually-entered anyio stderr task group with an asyncio task
  • make transport shutdown safe even when close() runs from a different task context
  • add a regression test that closes the transport from another task

Testing

  • python3 -m py_compile src/claude_agent_sdk/_internal/transport/subprocess_cli.py tests/test_transport.py
  • python3 -m pytest tests/test_transport.py -k "connect_close or different_task_context" (fails in this environment because the test import path is missing the mcp dependency)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant