Skip to content

Regression: pending approvals no longer appear in the workbench thread, and nothing signals a parked worker #1117

Closed

Description

@pratikbuilds

Problem

When a worker calls a gated tool (e.g. run_shell), its run parks on an approval, but the workbench thread shows nothing. The person sees "Working…" with no prompt, and no notification points them anywhere. In practice the worker looks slow or stuck, when it is actually waiting on a decision only the person can make.

Today the only place a pending approval surfaces is the bench drawer's Information → Needs you section, which you have to find on your own.

This is a regression. DESIGN.md says approvals render in-thread "where the decision happens: Allow once, Always allow (this workbench, this tool), Ask every time, Deny", and the thread used to do this.

How it regressed

The in-thread pieces still exist but nothing wires them up: ApproveBlockView (apps/web/src/chat/blocks/approve-block.tsx) and createChatApprovalActions (apps/web/src/approval-actions.ts).

Related gaps

  • No signal. The "N waiting on you" chip only renders on routes without their own top bar (effectively /), and it counts the account's root tenant, not the workbench the approval lives in. The drawer toggle has no badge.
  • Stale status. Nothing refetches the approvals list when a run parks. The inbox stream doesn't tick, despite a comment in workbench-page.tsx assuming it does. So the drawer list and the worker's "Needs you" status stay stale until something else triggers a refetch.
  • Orphaned approvals. If the run behind an approval is gone (e.g. the hub restarted and the worker was redeployed), the approval stays pending forever and Approve returns 409 ("workflow run no longer running"), surfaced as a bare "The server answered 409."

Proposed solution

  1. Render this workbench's pending approvals in the thread, at the point the worker parked, using ApproveBlockView + createChatApprovalActions: who is asking, the tool, the full call arguments, and Allow once / Always allow / Deny.
  2. Keep the drawer's Needs you section actionable as a secondary surface.
  3. Badge the drawer toggle (and/or the bench pill) with the pending count for this workbench.
  4. Poll approvals while a turn is pending, so a parked run surfaces within seconds.
  5. Show an approval whose run is no longer live as expired, with a clear message instead of a 409 toast.

Done when

  • A worker that parks on a gated tool shows an in-thread approval card within a few seconds, with no navigation.
  • Approving from the card resumes the run and the reply lands in the thread; denying ends the call.
  • The workbench shows a visible pending indicator wherever the person is looking.
  • A browser e2e covers park → in-thread approve → reply, against scripted inference.
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