feat(exec): add packageAutoApprove for agent package installs#780
Open
konamgil wants to merge 1 commit intonextlevelbuilder:devfrom
Open
feat(exec): add packageAutoApprove for agent package installs#780konamgil wants to merge 1 commit intonextlevelbuilder:devfrom
konamgil wants to merge 1 commit intonextlevelbuilder:devfrom
Conversation
…ackage installs via pkg-helper Agents running as non-root (goclaw user) cannot execute apk add/del directly. Previously, package install commands hit the approval flow and timed out when no admin was watching. This adds a `packageAutoApprove` config option that skips the approval wait and routes apk commands through the root-privileged pkg-helper Unix socket, while pip/npm commands proceed directly (already writable via entrypoint env vars). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves two issues when agents request package installs (
apk add,pip install,npm install) inside Docker containers:apk addfails withPermission deniedGiải quyết hai vấn đề khi agent yêu cầu cài đặt package (
apk add,pip install,npm install) trong Docker container:apk addthất bại vớiPermission deniedChanges / Thay đổi
Add
packageAutoApprovefield toExecApprovalConfig— configurable via"packageAutoApprove": truein config.jsonWhen
packageAutoApprove=true, detect apk commands and route them to the root-privilegedpkg-helperUnix socket automaticallypip installandnpm installwork as non-root (viaPIP_TARGET,NPM_CONFIG_PREFIXset in docker-entrypoint.sh), so auto-approve alone is sufficientThêm field
packageAutoApprovevàoExecApprovalConfig— cấu hình qua"packageAutoApprove": truetrong config.jsonKhi
packageAutoApprove=true, phát hiện lệnh apk và chuyển tự động đếnpkg-helperUnix socket (chạy quyền root)pip installvànpm installhoạt động với non-root (nhờPIP_TARGET,NPM_CONFIG_PREFIXtrong docker-entrypoint.sh), nên chỉ cần auto-approveConfig example / Ví dụ cấu hình
{ "tools": { "execApproval": { "security": "full", "ask": "off", "packageAutoApprove": true } } }Test plan
packageAutoApprove: true, ask agent to runapk add git→ installs via pkg-helperpip install requests→ succeeds as non-rootnpm install -g typescript→ succeeds as non-rootpackageAutoApprove: false(default) → existing approval flow works (no regression)/app/data/.runtime/apk-packagesand reinstall on container restart🤖 Generated with Claude Code