Skip to content

[Feature]: UI-owned child permission approvals without waking the orchestrator #1504

Closed

Description

@InCerryGit

Problem

When OpenChamber handles child permissions (automatic approval where appropriate, otherwise explicit user approval in the UI), the parent orchestrator does not need to participate in those approvals.

Today, a child permission request can wake the parent, which may call task_reply and then send unnecessary task_message instructions such as continuing the existing verification or reiterating retry limits. Those additional messages are not needed to resume the permission-gated tool: the host approval already does that.

Existing fixes and remaining gap

These are useful improvements, but suppressing quickly resolved requests is different from assigning permission handling to the UI. A legitimate manual approval can remain pending well beyond 250 ms without requiring any orchestrator intervention.

This request is about permission-handling ownership, not a claim that the merged race fixes are broken.

Requested behavior

Provide an explicit, supported way to leave child permission approval to the host/UI/user:

  • Pending child permission requests do not trigger parent model turns or permission-driven synthetic reminders.
  • UI automatic approvals and manual user approvals continue through the normal host permission flow.
  • Waiting for manual approval must not be mistaken for a stopped or failed job, causing an equivalent recovery wake through another path.
  • Permission state may remain visible in task status without requiring a parent response.
  • Genuine child questions, terminal results, and actionable task failures retain their normal routing. If denial leaves the task genuinely unable to proceed, reporting that outcome is distinct from asking the parent to approve a permission.
  • Do not weaken permission rules, auto-approve requests in the plugin, or bypass a denial.

An opt-in UI-owned permission mode would preserve existing parent-mediated behavior for workflows that need it. The exact configuration/API is left to maintainers; merely increasing the debounce duration would not establish this ownership boundary.

Acceptance examples

  1. A child permission is approved immediately by the UI: the tool continues, with no permission-driven parent wake.
  2. A permission waits for manual user approval for several seconds or longer: it remains pending in the UI, with no parent task_reply attempt or recovery wake solely because of that wait; approval resumes the tool normally.
  3. A child asks a genuine task question: normal question routing still works.
  4. A permission is denied: denial remains effective; any actual resulting task failure is reported normally.
  5. Workflows retaining parent-mediated permissions keep their existing behavior.

Observed environment

OpenCode v2 with OpenChamber; local plugin configuration pins oh-my-opencode-slim 3.0.3. The merged follow-up PRs above were reviewed for scope, not installed and retested locally. This request intentionally covers the remaining UI-ownership requirement beyond their documented behavior.

Activity

  1. mhenke commented on Oct 11, 2026

    @mhenke
    Collaborator

    This was generated by AI during triage.

    Thanks @InCerryGit. Good news: most of this already exists. backgroundJobs.childInputWake: false turns the permission wake off. It's in the config schema and documented in docs/configuration.md.

    The catch: it's all-or-nothing. It kills question wakes too, so a child asking the user something goes quiet. That per-kind split (permission vs question) is the real gap, and the notification already carries the kind, so the fix is small.

    Two things before we move on it:

    1. Can you confirm childInputWake: false stops the filler on your setup?
    2. Do you also get recovery wakes when a permission-pending child goes idle? Quick check: trigger a slow manual approval, then grep the plugin log for "terminal-gate ... stopped". That tells us if the stop path needs a guard too.
  2. added
    needs-infoMore information is needed before we can act
    on Oct 11, 2026
  3. Jiajun0413 commented on Oct 13, 2026

    @Jiajun0413
    Collaborator

    Tool-surface progress from #1540 (alignment, not a solution of this issue's core): on v2, task_reply's rejection path now redirects question-form dismissal to the host UI instead of attempting a plugin-side reject — the plugin does not fake form.cancel semantics, matching the ownership boundary requested here (dismissive decisions belong to the host/UI/user). The v2 surface also stopped advertising question replies it cannot serve (permission-only describe). The wake-ownership core — permission approvals not waking the orchestrator — remains open and untouched by that PR.

  4. lamiskin commented on Oct 16, 2026

    @lamiskin

    Setup: OpenCode 2.0.29, oh-my-opencode-slim 3.0.4, OpenChamber with its Safety Net enabled and auto-resolving child permission asks, orchestratorWake.mode: auto (resolves to children on v2), backgroundJobs defaults. This looks like the same race as #1435, with the Safety Net as the external replier. The wake-mechanics part below comes from reading the 3.0.4 bundle, not from a minimal live repro.

    Ask-to-resolve latency. I paired background child input wait opened with ... resolved by request ID in the plugin log: 1,609 pairs (all kind: permission) over Oct 11-16, 906 of them from one day. The plugin log has no field for who resolved an ask, so I can't attribute these latencies to the Safety Net from the log alone. The Safety Net being enabled is setup knowledge, not something the log shows.

    all days one day
    median 229 ms 45 ms
    P90 316 ms 313 ms
    P99 2,123 ms 625 ms
    max 10.9 s 10.9 s
    resolved after 250 ms 42.8% 31.8%
    resolved after 500 ms 1.8% 1.5%
    resolved after 1,500 ms 1.1% 0.8%

    With the hardcoded 250 ms CHILD_INPUT_WAKE_SETTLE_MS, roughly a third to 43% of asks resolve after the window closes. If the wake has been submitted by then, the orchestrator still gets a turn. task_reply now returns the benign "resolved elsewhere" result from #1435, but the turn (and its tokens) are already spent. Reading the bundle: on v2 the wake goes out with delivery: "queue" and nothing retracts a queued wake once its request resolves, and triggerDeltaWake does not check whether the parent is busy (isParentActiveByEvents is only used for publication wakes).

    Re your question 2 (recovery wakes). Yes, in my logs. A permission wait opening is followed ~250 ms later by an orchestrator-wake evaluate verdict with recoveryWake: true, trigger: "recovery" (7 times in one day's log; in an Oct 11 log the attempt was aborted as parent-active). I did not establish whether these are the same wakes as the child-input ones. I found no terminal-gate ... stopped line in the 3.0.4 logs; the gate logs state: completed instead, so that grep returns nothing on this version.

    Re your question 1. I have not tested childInputWake: false yet. Noting the cost: it also silences question wakes.

  5. added a commit that references this issue on Oct 16, 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

    needs-infoMore information is needed before we can act

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions