Skip to content

feat: Human-in-the-loop approval prompt with approve/deny controls #21

@rdwj

Description

@rdwj

Summary

When an agent requests approval for a tool execution, display a clear approval prompt in the conversation with approve/deny buttons and tool call details. This is the UI surface for human-in-the-loop (HITL) workflows where agents must get explicit permission before taking actions.

UX Requirements

  • Approval request rendered as a distinct message type — visually differentiated from regular messages (e.g., amber border or card style)
  • Show tool name, arguments (formatted), and reason for approval request
  • Approve and Deny buttons with clear visual hierarchy (Approve is primary action)
  • Optional Modify button to edit tool arguments before approving
  • Timeout countdown if the approval has a server-side deadline
  • Approval status indicator (pending, approved, denied, timed out)
  • Conversation remains readable and scrollable while waiting for approval — don't block the entire UI
  • Keyboard shortcuts for approve/deny (with confirmation to prevent accidents)

Implementation Notes

Listen for approval-request events via the streaming connection (SSE or WebSocket). Render the approval card inline in the message list. POST approve/deny decisions to /v1/sessions/{id}/resume via the gateway. The resume payload includes the decision and optionally modified arguments. Handle race conditions where the server times out before the user responds.

Companion Issues

Companion issues filed on fips-agents/agent-template, fips-agents/gateway-template, fips-agents/fips-agents-cli, and fips-agents/examples.

Size

M

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions