Disable claude-code systemd limits

This commit is contained in:
2026-07-14 21:11:35 -07:00
parent db267226a8
commit 58a3512c28
+10 -11
View File
@@ -186,18 +186,17 @@ fi
# Tool options # Tool options
export SHELLCHECK_OPTS="-e SC2029 -e SC2155" export SHELLCHECK_OPTS="-e SC2029 -e SC2155"
# Limit claude-code: cap CPU/memory/process count so a runaway subprocess # Limit claude-code: cap CPU/memory/process count
# (or its children, e.g. from the Bash tool) can't overheat the laptop.
# Adjust the -p values if these limits are ever too tight. # Adjust the -p values if these limits are ever too tight.
if program_installed claude && program_installed systemd-run; then # if program_installed claude && program_installed systemd-run; then
claude() { # claude() {
systemd-run --user --scope --quiet \ # systemd-run --user --scope --quiet \
-p CPUQuota=50% \ # -p CPUQuota=50% \
-p MemoryMax=6G \ # -p MemoryMax=6G \
-p TasksMax=512 \ # -p TasksMax=512 \
-- command claude "$@" # -- command claude "$@"
} # }
fi # fi
# Syntax highlighting # Syntax highlighting
if [ -f /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]; then if [ -f /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]; then