Skip to content

Sandbox tool invocation fails when additional_permissions is empty or mismatched #847

Description

@PierrunoYT

Summary

A simple command execution failed because the tool call included an additional_permissions object without setting sandbox_permissions to with_additional_permissions, and then failed again when additional_permissions contained no effective network or filesystem permission.

Reproduction

In a continued Zero session, the user asked to run:

git branch --show-current

The command should be a normal read-only git operation and should not require extra sandbox permissions.

Observed errors from tool invocation:

Error: additional_permissions requires sandbox_permissions set to "with_additional_permissions"

Then, with sandbox_permissions set to with_additional_permissions but an empty permissions payload:

Error: additional_permissions must include at least one of network or file_system, for example {"network": {"enabled": true}} or {"file_system": {"write": ["/path"]}}

I reproduced the same validation class while attempting another read-only command (gh --version) when an empty additional_permissions object was preserved in the request.

Expected behavior

Read-only commands like git branch --show-current should run with default sandbox permissions, or the tool layer should omit empty additional_permissions entirely.

Actual behavior

The tool invocation is rejected before the command runs because permission metadata is internally inconsistent:

  • additional_permissions present with sandbox_permissions: use_default, or
  • sandbox_permissions: with_additional_permissions but no effective permission requested.

Notes

This appears to be a request construction / validation issue rather than a git failure. The actual git command succeeds when invoked without the inconsistent permission metadata.

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