Skip to content

Parent threads cannot see a child blocked on an approval #58

Closed as not planned

Description

@lukemaj

Outcome

A parent thread knows when a child it spawned is blocked on an approval, and a planner cannot silently start an unattended child in a mode that needs approvals or has no network.

Evidence (2026-09-27 to 2026-09-28)

  • A planner started a worker with spawn_thread(role: worker, runtimeMode: "auto") on OpenCode. For OpenCode, "auto" falls back to asking (apps/server/src/provider/opencodeRuntime.ts:514; docs/user/permission-modes.md), so the session had bash: ask and edit: ask. Its first command waited for an approval nobody saw, was aborted, and the worker made no progress for about 20 hours.
  • Throughout, list_child_threads and read_thread reported the child as running with a normal-looking last message. reportBack only fires when a turn finishes, so the parent got no signal. The user noticed the pending prompt in the UI; the planner did not.
  • The same planner started a reviewer with runtimeMode: "auto" on Codex. "auto" maps to sandbox: "workspace-write" (CodexSessionRuntime.ts:535-539), which has no network, so the reviewer could not reach GitHub and returned a blocker saying it could not read the Issue or PR.
  • The spawn_thread description does not say what each runtimeMode means per provider.

Acceptance criteria

  • When a child has a pending approval or user-input request, list_child_threads and read_thread report a distinct status (for example awaiting_approval) with the requested action.
  • With reportBack, the parent receives a message when a child starts waiting for approval, not only when a turn ends.
  • The spawn_thread description states, per provider, what each runtimeMode allows (network, commands, edits) and which modes need a human to approve.
  • Children default to the role kit's or the parent's mode when runtimeMode is omitted (current behavior), and the description recommends omitting it for unattended work.

Non-goals

  • Letting a parent approve on the user's behalf (a separate authority decision).
  • Changing provider permission semantics.

Blockers

None known.

Proof

Spawn an OpenCode child in "auto" that runs a bash command: the parent sees awaiting_approval and receives a report-back message. The spawn_thread description lists the per-provider meaning of each mode.

Activity

  1. lukemaj commented on Sep 28, 2026

    @lukemaj
    ContributorAuthor

    Superseded by toolboxmd/model-router#138: role agents should never run in a mode that needs approval, so surfacing approval prompts to the parent is not needed. Reopen if a role legitimately needs interactive approval.

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

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions