Disable claude-code systemd limits
This commit is contained in:
+10
-11
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user