Skip to content

Child threads can run with more permissions than their parent #1593

Closed

Description

@sholub-dev

A managed child thread's requested permission mode is honored unconditionally, so an agent running in a sandboxed parent thread can spawn an unsandboxed child.

Reproduce

  1. Start a thread in Approve for me (auto) mode.
  2. Have the agent run bb thread spawn --project <id> --parent-self --prompt "..." --permission-mode full.
  3. The child thread runs with Full Access: no workspace sandbox, no approval reviewer.

An auto parent spawned three full children because the agent passed --permission-mode full in its spawn commands. resolveThreadExecutionPermissionMode takes requestedPermissionMode first and never compares it to the parent's mode.

A second escalation path exists in the inherit branch: resolveSupportedPermissionMode falls back upward through the provider's supported modes, so a Pi child (supports only full) of an auto parent silently inherits full.

Expected

The parent's last-executed mode should be a hard ceiling for managed child threads. A child can run at or below its parent's mode, never above it.

Activity

  1. added theissue type on Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions