Skip to content

bug(review): review-consent UI bypasses the Herdr blocked lifecycle and propagates silently #1203

Description

@jparradog

Before submitting

  • I searched open and closed issues and did not find a report of this problem.
  • I reviewed this report and removed credentials, tokens, private paths, hostnames, and other sensitive data.

Problem

The native review consent envelope (gentle-ai.review-integration.consent/v3, rendered as "Review consent / Review this change / Skip this time / Review and allow this session") blocks the agent mid-turn inside a Herdr pane, but Herdr never learns about it: the pane keeps reporting working until the human happens to look at it. There is no blocked state and no attention signal, so a session can sit parked on a human decision indefinitely while every observer believes it is still working.

gentle-ai already owns the correct mechanism: createHerdrConfirmationLifecycle emits the deduplicated herdr:blocked event for three agent-initiated blockers:

  • ask_user_choice (via gentle-pi:ask-user-choice:blocked)
  • the RPIV questionnaire (via rpiv:ask-user:blocked)
  • guarded command confirmations (begin()/settle() around confirmCommand)

The consent UI is not wired into that lifecycle. The call site awaits presentReviewConsentUi(...) directly (the ReviewConsentComponent shown via ctx.ui.custom), with no begin()/settle() and no blocked event. The Herdr pi bridge (herdr-agent-state.ts) therefore keeps reporting working (agentActive is still true because agent_settled has not fired while the tool call is pending).

This is the same pattern previously fixed for ask_user_choice (#472) and the questionnaire (#459). The broader "surface blocked-on-human status + unfocused-terminal notifications" UX ask is tracked separately in #1165; this report is the narrow consent-specific wiring gap that the existing lifecycle already knows how to close.

Suggested fix: wrap the presentReviewConsentUi call site with the existing herdrLifecycle (begin() before, settle() after, including the cancel path), with a blocker label such as "Review consent awaiting input". Also worth auditing any other agent-initiated ctx.ui.* blocker for the same omission (e.g. the SDD marker confirmation).

Steps to reproduce

  1. Run pi inside a Herdr pane with gentle-pi installed and receipt-driven review enabled.
  2. Complete an authorized medium/high-risk source change and let the agent run the native review START until the consent envelope UI appears ("Review consent" with the three options).
  3. Leave the prompt open and unanswered. From another pane run herdr agent list.
  4. Observe the reported state of the agent in the consent pane.

Expected and actual behavior

Expected:

  • While the consent UI is open, the agent is reported as blocked (e.g. "Review consent awaiting input"), so Herdr marks the pane and it participates in the blocked-agent attention queue.
  • After answering, the state returns to working.

Actual:

  • The agent reports working for the entire time the consent UI is open. No blocked state, no notification, no attention signal; the stall is only discovered by manually switching to the pane.

gentle-pi version

3.2.0

Pi version

0.85.1

Operating system

Windows (WSL)

Relevant logs or error output (optional)

No response

Activity

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