Skip to content

feat(transport): expose subprocess PID for external cleanup#995

Open
SAY-5 wants to merge 1 commit into
anthropics:mainfrom
SAY-5:feat/expose-subprocess-pid-v2
Open

feat(transport): expose subprocess PID for external cleanup#995
SAY-5 wants to merge 1 commit into
anthropics:mainfrom
SAY-5:feat/expose-subprocess-pid-v2

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented May 27, 2026

Per anthropics/anthropic-sdk-python#1370, callers that need to forcibly clean up the spawned claude CLI process currently have to walk async generator internals to find the process, which is fragile.

Add a public pid property on SubprocessCLITransport that returns the underlying process PID, or None if no process is currently running. The existing close() already implements the graceful-shutdown -> SIGTERM -> SIGKILL escalation requested in the issue; this PR only adds the PID accessor.

Closes anthropics/anthropic-sdk-python#1370

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
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.

Feature request: expose subprocess PID from SubprocessCLITransport for cleanup

1 participant