Skip to content

v0.7.2

Choose a tag to compare

@mdjarv mdjarv released this 01 Oct 13:26
· 30 commits to master since this release

Fixed

  • Windows: killing a session now kills the CLI's whole process tree.
    Previously context cancellation called cmd.Process.Kill(), which
    terminates only claude.exe — its MCP servers (npx/node) and any Chromium
    they spawned survived until their stdin-EOF handling exited them, or
    forever if wedged. LocalExecutor now confines each spawn in an anonymous
    kill-on-close job object: cancel calls TerminateJobObject (tree kill),
    and the job handle is closed after Wait() returns, reaping stragglers
    that outlive a clean CLI exit. Matches the unix Setpgid + kill(-pid)
    behavior. If job creation or assignment fails, the executor degrades to
    the old single-PID kill rather than failing the spawn. Known caveat:
    assignment happens just after Start() (os/exec has no CREATE_SUSPENDED
    path), so a child forked in that instant could escape — in practice the
    CLI takes far longer to start MCP servers.

    Upgrade note: adds a golang.org/x/sys dependency (Windows builds only);
    no API changes.

  • Windows: every direct CLI spawn now suppresses its console window.
    Only LocalExecutor set CREATE_NO_WINDOW; the AuthStatus, AuthLogin,
    AuthLogout, Update and -v probe spawns did not, so a windowless
    parent (a service, a GUI app) flashed a console on screen for each —
    once per auth-status poll.

  • Windows: AuthLogin's BROWSER capture works for usernames with
    spaces.
    The generated browser.cmd redirected to an unquoted temp
    path; a space in it (e.g. C:\Users\Anna Karin\...) truncated the
    redirect target and silently dropped the captured callback URL. The
    target is now quoted.

  • Windows: npm's claude.cmd shim is bypassed. When the resolved
    binary is npm's cmd.exe shim and the layout confirms it wraps
    @anthropic-ai/claude-code, the executor runs node on the wrapped
    cli.js directly — os/exec refuses to start batch files with arguments
    cmd.exe cannot safely escape (the CVE-2024-24576 hardening), so e.g. a
    WithSystemPrompt containing % or " failed at Start() behind a
    shim. The bypass also removes the cmd.exe layer from the process tree.
    Falls back to running the shim when node is missing or the layout is
    unconfirmed.

  • Cancelling Update interrupts the whole process group. On unix,
    SIGINT now goes to the updater's process group (previously the single
    CLI process), so npm/node children unwinding a staged download are
    interrupted too. On Windows — where no console interrupt is deliverable
    from a windowless parent — cancellation is an immediate job-object tree
    kill instead of a lone claude.exe kill that orphaned npm children.

  • AuthLogin and LoginProcess.Cancel kill the login CLI's whole
    process tree
    (job object on Windows, process group on unix) instead of
    just the CLI process.