antigravity-cli: disable_web_search is a no-op, but agy's web tools bypass the network allowlist

Open
#4,567 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@marcusschiesser is already working on this.

Since Dec 2, 2026.

  • #4569 by @marcusschiesser — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
devtools, security

Research direction

Inspect the antigravity-cli agent configuration and the code that handles disable_web_search and agent network policies. The issue identifies agy’s five web tools and provides a working PreToolUse hook example; use those details to trace how tool restrictions are installed and removed when settings change. Confirm the behavior with an allowlisted run, where those tool calls should be denied. A linked pull request is already open.

Written by the indexing model from the issue text.

Description

Problem

With disable_web_search=true (or a restricted no-network / allowlist agent network policy), Harbor logs:

Agent 'antigravity-cli' exposes no native web search or fetch tools for Harbor to disable; continuing.

But agy has native web tools: search_web, read_url_content, open_browser_url, read_browser_page and browser_subagent. They run through Google's backend rather than the container's network, so they also bypass the sandbox network allowlist. In an allowlisted run the agent can still search the web.

Found while running Harbor 0.27.0 with agy 1.5.21 for a benchmark run.

Repro

  1. Task with [agent] network_mode = "allowlist" (only the model API allowed), or pass --ak disable_web_search=true.
  2. harbor run -p <task> -a antigravity-cli -m gemini/gemini-3-flash-preview --ak version=1.5.21 with an instruction that asks the agent to search the web.
  3. The trajectory contains successful search_web / read_url_content calls.

What does and does not work in agy 1.5.21

Settings cannot remove these tools: disabledTools, disableSimpleResearchTools and permissions.deny rules all left search_web working (see also google-antigravity/antigravity-cli#296).

A global PreToolUse hook does block them. ~/.gemini/config/hooks.json:

{
  "harbor-disable-web-search": {
    "PreToolUse": [
      {
        "matcher": "^(search_web|read_url_content|open_browser_url|read_browser_page|browser_subagent)$",
        "hooks": [{"type": "command", "command": "/root/.gemini/config/deny-web-tools.sh", "timeout": 10}]
      }
    ]
  }
}

The script reads stdin and prints {"decision":"deny","reason":"..."}. Every call to the five tools is then denied and the model sees the reason.

Proposal

Declare native_web_tools=True for antigravity-cli and install this hook when disable_web_search is in effect (removing it again when a later step re-enables web tools). A PR follows.

Drafted with AI assistance (Claude Code) and reviewed before posting.

Dominant language
Python
Stars
5.6k
Forks
1.9k
Avg merge
1d 17h
Merged PRs (30d)
156

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from harbor-framework/harbor

All issues in harbor-framework/harbor

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.