Skip to content

client.receive_response() never returns when claude code's output contains none json lines #148

@saixiaohui

Description

@saixiaohui

My claude code displays following items during start up and these items isn't json.

In https://github.com/anthropics/claude-code-sdk-python/blob/68f0d7aa7dd964ef91d4e5e259d84a9f7d81bc03/src/claude_code_sdk/_internal/transport/subprocess_cli.py#L293, it assumes the output is always json so that function keeps waiting for stdout stream and never returns.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions