Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix: block claude settings flag for antigravity (#4974)
Multica Evef67f0bc9d8b8
diff --git a/server/pkg/agent/antigravity.go b/server/pkg/agent/antigravity.goindex c3e3e578c9..af842309f1 100644--- a/server/pkg/agent/antigravity.go+++ b/server/pkg/agent/antigravity.go@@ -420,6 +420,7 @@ var antigravityBlockedArgs = map[string]blockedArgMode{"--print-timeout": blockedWithValue,"--dangerously-skip-permissions": blockedStandalone, // always-on in daemon mode"--log-file": blockedWithValue, // daemon needs it for session capture+ "--settings": blockedWithValue, // Claude Code-only flag; agy rejects it}// buildAntigravityArgs assembles the argv for a daemon-compatible one-shot agydiff --git a/server/pkg/agent/antigravity_test.go b/server/pkg/agent/antigravity_test.goindex 4393d364e0..7e55df64f8 100644--- a/server/pkg/agent/antigravity_test.go+++ b/server/pkg/agent/antigravity_test.go@@ -214,9 +214,13 @@ func TestBuildAntigravityArgsFiltersBlockedCustomArgs(t *testing.T) {"/tmp/agy.log",time.Minute,ExecOptions{+ ExtraArgs: []string{+ "--settings", "/tmp/biz-gate.json", // Claude Code-only daemon/profile arg; agy rejects it+ },// Each blocked flag below must be stripped silently — the daemon// owns these because they're required for non-interactive,- // resume-aware operation.+ // resume-aware operation, or because the flag is unsupported by+ // Antigravity.CustomArgs: []string{"-p", "hijacked-prompt","-i",@@ -228,6 +232,7 @@ func TestBuildAntigravityArgsFiltersBlockedCustomArgs(t *testing.T) {"--dangerously-skip-permissions","--print-timeout", "1h","--log-file", "/elsewhere.log",+ "--settings=/tmp/agent-settings.json","--add-dir", "/extra", // user-added workspace dir should survive},},@@ -261,6 +266,9 @@ func TestBuildAntigravityArgsFiltersBlockedCustomArgs(t *testing.T) {if strings.Contains(joined, "/elsewhere.log") {t.Errorf("custom --log-file value leaked through filter: %v", args)}+ if strings.Contains(joined, "--settings") || strings.Contains(joined, "biz-gate.json") || strings.Contains(joined, "agent-settings.json") {+ t.Errorf("Antigravity-incompatible --settings flag leaked through filter: %v", args)+ }if !strings.Contains(joined, "--add-dir /extra") {t.Errorf("non-blocked --add-dir flag should pass through: %v", args)}