antigravity-sdk-python icon indicating copy to clipboard operation
antigravity-sdk-python copied to clipboard

Subagent write tools always denied — parent's policies don't propagate to subagents

Open jiridanek opened this issue 5 months ago • 1 comments

A subagent defined with enable_write_tools=true via define_subagent cannot write files — the edit_file / write_to_file calls are denied with "permission denied."

The parent agent's policies=[policy.allow_all()] does not propagate to subagent trajectories. This means there is no way to create a subagent that can write files, even when explicitly enabled.

Related: #65 (MCP tool isolation flags also not enforced)

Steps to reproduce

  1. Configure agent with policies=[policy.allow_all()] and enable_subagents=True
  2. Define a subagent: define_subagent(name='writer', enable_write_tools=true, ...)
  3. Invoke the subagent with a prompt to create a file
  4. Subagent's write_to_file call is denied

Expected behavior

With enable_write_tools=true, the subagent should be able to create/edit files.

Actual behavior

Write tools are denied regardless of the flag. The subagent reports "permission for the tool call was denied."

Environment

  • SDK: google-antigravity (latest from PyPI as of 2026-06-15)
  • Model: gemini-3.1-pro-preview-customtools
  • Platform: macOS 26, Python 3.14

See #65 for full reproduction code and results table.

jiridanek avatar Jun 14 '26 22:06 jiridanek

Closing as a duplicate of #65, which covers both halves of this behavior (MCP tools not restricted and write tools always denied for subagents). Please follow #65 for updates.

rodydavis avatar Nov 16 '26 19:11 rodydavis