Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: anthropics/claude-agent-sdk-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: Mng-dev-ai/claude-code-sdk-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 8 commits
  • 5 files changed
  • 1 contributor

Commits on Feb 14, 2026

  1. Add usage field to AssistantMessage

    The CLI returns per-turn usage data on each assistant message but the SDK
    was dropping it during parsing. This exposes it as an optional dict on
    AssistantMessage so consumers can track context token usage mid-stream.
    Mng-dev-ai committed Feb 14, 2026
    Configuration menu
    Copy the full SHA
    77da402 View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2026

  1. Configuration menu
    Copy the full SHA
    876d4db View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2026

  1. fix: add timeout to Query.close() to prevent CPU busy-loop

    When tasks don't respond to cancellation cleanly, anyio's
    _deliver_cancellation() enters a busy-loop pegging CPU at 50-100%.
    Set a 5s deadline on the task group's own cancel scope so it times
    out instead of spinning indefinitely.
    
    Ref: #378
    Mng-dev-ai committed Mar 1, 2026
    Configuration menu
    Copy the full SHA
    532c5aa View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2026

  1. Configuration menu
    Copy the full SHA
    22e387e View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2026

  1. Configuration menu
    Copy the full SHA
    4b27a9e View commit details
    Browse the repository at this point in the history
  2. feat: add worktree option to ClaudeAgentOptions

    Support the --worktree CLI flag for creating git worktrees per session.
    Accepts True for auto-generated names or a string for explicit naming.
    Mng-dev-ai committed Mar 15, 2026
    Configuration menu
    Copy the full SHA
    a10ea61 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #1 from Mng-dev-ai/feat/add-worktree-option

    feat: add worktree option to ClaudeAgentOptions
    Mng-dev-ai authored Mar 15, 2026
    Configuration menu
    Copy the full SHA
    f375889 View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2026

  1. Fix cross-task CancelScope busy-loop in Query lifecycle

    When Query.close() was called from a different asyncio task than the
    one that called Query.start(), anyio's CancelScope.__exit__ raised
    RuntimeError ("different task") and never completed. This left
    _deliver_cancellation in an infinite call_soon loop, burning ~4% CPU
    per leaked scope.
    
    The root cause was start() calling __aenter__() on the task group in
    one task and close() calling __aexit__() from another. anyio requires
    these to happen in the same task.
    
    Fix: move the task group into a dedicated _run_reader coroutine
    launched via asyncio.create_task, so enter and exit always happen in
    the same task. close() now closes the transport first (letting
    _read_messages exit naturally via sentinel/EOF), then awaits the
    reader task's completion signal with a timeout fallback.
    Mng-dev-ai committed Mar 16, 2026
    Configuration menu
    Copy the full SHA
    66ce774 View commit details
    Browse the repository at this point in the history
Loading