Skip to content

There are several critical issues related to session_id. #422

@jujumilk3

Description

@jujumilk3

First, session_id expires inconsistently. A week-old conversation's session_id still works, but sometimes a 2-day-old one is already gone.

Second, submitting a query with an expired or invalid session_id (e.g., "foobar", "helloworld") causes the Claude Agent SDK to terminate with exit code 1, displaying "Unknown Error." This error is identifiable—it should be labeled as an "invalid session_id error." Unfortunately, since the SDK is just a wrapper around the Claude Code CLI rather than a standalone Python package, I cannot fix this issue.

I think this needs stable session management and a validation API to check the session_id before submitting queries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions