Skip to content

Bridge approved parent tools for imported sandbox agents #1783

Description

@chubes4

Problem

Imported native agents execute in WordPress Playground but receive no workspace/Git/GitHub tools. The reusable workflow correctly classifies those tools as parent / control_plane; sandbox-tool-policy therefore excludes them and tool_contract.tools is empty.

Evidence: https://github.com/Automattic/build-with-wordpress/actions/runs/29311239264

The technical bootstrap agent runs but cannot inspect or modify the target checkout and returns no-op.

Required outcome

Implement the generic parent-tool bridge already modeled by wp-codebox/parent-tool-bridge/v1:

  • Expose only approved parent tool schemas to the model as bridged client tools while retaining parent/control-plane execution classification.
  • Pause the Agents API loop on a bridged call, return a bound pending request to the Node host, execute it through the policy-aware runner-workspace executor, submit the result, and resume the same runtime conversation until terminal.
  • Bind request/result to run, session, tool call, allowed tool and allowed repository; enforce idempotency, turn/tool/time budgets, approval and redaction.
  • Never expose host paths, tokens, shell access, or arbitrary command execution to the sandbox.
  • Support workspace read/search/write/edit/patch and the declared Git/GitHub operations through existing typed executors.
  • Add deterministic imported-package E2E: model reads and edits a temp workspace through the bridge, verification passes, patch captured; spoof/denied/malformed/replay cases fail.
  • No Docs Agent-specific production code.
  • Release and rerun both maintenance and bootstrap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions