Skip to content

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

Description

@jiridanek

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions