Default Claude wrappers to auto permission mode when unset.
Preserve user-provided --permission-mode flags while injecting --permission-mode auto as the fallback. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+13
-1
@@ -38,4 +38,16 @@ export ANTHROPIC_DEFAULT_OPUS_MODEL="glm-5.1"
|
|||||||
|
|
||||||
echo "→ Backend: GLM"
|
echo "→ Backend: GLM"
|
||||||
|
|
||||||
exec claude "$@"
|
has_permission_mode=false
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [ "$arg" = "--permission-mode" ] || [[ "$arg" == --permission-mode=* ]]; then
|
||||||
|
has_permission_mode=true
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$has_permission_mode" = true ]; then
|
||||||
|
exec claude "$@"
|
||||||
|
else
|
||||||
|
exec claude --permission-mode auto "$@"
|
||||||
|
fi
|
||||||
|
|||||||
@@ -38,4 +38,16 @@ export ANTHROPIC_DEFAULT_HAIKU_MODEL="gpt-5.3-codex(medium)"
|
|||||||
|
|
||||||
echo "→ Backend: GPT"
|
echo "→ Backend: GPT"
|
||||||
|
|
||||||
exec claude "$@"
|
has_permission_mode=false
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [ "$arg" = "--permission-mode" ] || [[ "$arg" == --permission-mode=* ]]; then
|
||||||
|
has_permission_mode=true
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$has_permission_mode" = true ]; then
|
||||||
|
exec claude "$@"
|
||||||
|
else
|
||||||
|
exec claude --permission-mode auto "$@"
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user