Add -r shorthand to SKIP_SESSION_ID check in claude wrapper (#1992)

* Add -r shorthand to SKIP_SESSION_ID check in claude wrapper

The wrapper checked for --resume but not its -r shorthand, causing
claude -r to fail with a --session-id conflict error because the
wrapper injected its own --session-id alongside the implicit --resume.

Fixes #1987

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Remove invalid -r=* pattern from SKIP_SESSION_ID check

Short options don't use the = form, so -r=* would never match a real
CLI invocation. Keep only -r as the shorthand for --resume.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Achieve 2026-03-25 11:26:50 +08:00 committed by GitHub
parent 7ffa447708
commit b24a53dc06
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -69,7 +69,7 @@ unset CLAUDECODE
SKIP_SESSION_ID=false
for arg in "$@"; do
case "$arg" in
--resume|--resume=*|--session-id|--session-id=*|--continue|-c)
--resume|--resume=*|-r|--session-id|--session-id=*|--continue|-c)
SKIP_SESSION_ID=true
break
;;