Repository navigation
Conversation
Headless `agy -p` auto-denies any tool that needs approval ("a tool
required the read_file permission that headless mode cannot prompt
for"), so antigravity sub-tasks returned no output and exited 1. agy's
own auto mode is no fallback: it is disabled when the terminal sandbox
is unavailable (AppArmor restricting unprivileged user namespaces).
The claude backend already passes --dangerously-skip-permissions
unconditionally (#143); the antigravity builder still gated it on
cfg.SkipPermissions, which no caller sets. Pass it unconditionally and
cover new/resume/nil args with a unit test.
via [HAPI](https://hapi.run)
Co-Authored-By: HAPI <noreply@hapi.run>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Additional verification: re-ran the long read-heavy research prompt that previously hung >10 min with no output (headless agy, pre-fix). With this patch it completed in 4m55s, exit 0, with full JSON output. The |
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.
Problem
codeagent-wrapper --backend antigravityruns headlessagy -p. When a task needs a tool that requires approval (e.g.read_file), agy auto-denies it:The wrapper then exits 1 with
agy completed without agent_message output. agy's auto mode doesn't help: on hosts where the terminal sandbox is unavailable (AppArmorkernel.apparmor_restrict_unprivileged_userns = 1), agy logsauto mode is unavailable … falling back to default.The claude backend already passes
--dangerously-skip-permissionsunconditionally (#143).buildAntigravityArgsstill gated the flag oncfg.SkipPermissions, and no caller sets that.Change
buildAntigravityArgsalways passes--dangerously-skip-permissions, the same as claude.TestAntigravityBuildArgs_AlwaysSkipsPermissionscovers new mode, resume mode and a nil config.Verification
go vet ./...passes.agyread a repo file and returned the expected JSON in about 51 s. Before the patch the same kind of task failed with theread_filedenial.go test ./...has 4 failures:TestExecutorExecuteConcurrentWithContextBranches,TestLoggerWithSuffixReturnsErrorWhenTempDirNotWritable, and twoTestRunCodexTask_*timing tests. They fail identically on the base commite99bd5bwithout this change (the tests run as root, and timing is environment-dependent), so they predate this PR.Security note
agy sub-tasks now approve tools without a prompt inside the
--add-dirscope. The claude backend already runs this way.🤖 Generated with Claude Code