Skip to content

Feature Request: Plan Editing & Approval Workflow with Feedback Loop #37

@mohd-talib0

Description

@mohd-talib0

Feature Request: Plan Editing & Approval Workflow with Feedback Loop

Summary

Add a plan approval workflow that allows users to review, modify (via feedback), approve, or cancel generated plans before execution begins.


Problem

Currently, when a user submits a task:

  1. The planner agent generates a plan
  2. The plan is immediately executed without user review
  3. Users have no control over:
    • Reviewing the plan before execution
    • Requesting modifications to the plan
    • Cancelling execution before it starts
    • Approving individual sensitive steps (web automation, code execution)

This leads to:

  • Unexpected agent behavior
  • Wasted compute on incorrect plans
  • Security concerns for sensitive operations
  • Poor user experience when plans need refinement

Proposed Solution

User Flow

[User Query] → [Plan Generated] → [USER REVIEW]
                                       ↓
                              ┌────────┼────────┐
                              ↓        ↓        ↓
                         [Approve] [Request   [Cancel]
                            &Run    Changes]     Run
                              ↓        ↓        ↓
                         [Execute] [Feedback] [Stop]
                                       ↓
                                 [Regenerate Plan] → [USER REVIEW] (loop)

Features

  1. Plan Approval Gate

    • Display generated plan to user before execution
    • Three options: Approve & Run, Request Changes, Cancel Run
  2. Feedback-Based Plan Modification

    • User provides text feedback (e.g., "Include budget considerations")
    • AI regenerates plan incorporating feedback
    • Loop continues until user approves or cancels
    • Maximum retry limit (e.g., 5) to prevent infinite loops
  3. Read-Only Plan Display

    • Users cannot manually edit plan text (prevents sync issues)
    • Modifications only through AI-powered feedback loop
  4. Optional Step-by-Step Approval

    • Checkbox: "Require approval before each web action"
    • Checkbox: "Require approval before each coding step"
    • For sensitive workflows (logins, form submissions, code execution)
  5. Graceful Cancellation

    • Friendly message: "Task cancelled by user. No changes were made."
    • No Python tracebacks shown to users

UI Mockup

Plan Approval Card

┌─────────────────────────────────────────────────────────┐
│ Review the generated plan before execution.             │
│                                                         │
│ 📋 Click to view plan                            [→]    │
│                                                         │
│ ☐ Require approval before each web action              │
│ ☐ Require approval before each coding step             │
│                                                         │
│     [Cancel Run]  [Request Changes]  [Approve & Run]   │
└─────────────────────────────────────────────────────────┘

Feedback Input (when "Request Changes" clicked)

┌─────────────────────────────────────────────────────────┐
│ What changes would you like to see in the plan?         │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ E.g., Include a visit to the Louvre, add budget... │ │
│ └─────────────────────────────────────────────────────┘ │
│                                                         │
│                        [Cancel]  [Submit Feedback]      │
└─────────────────────────────────────────────────────────┘

Acceptance Criteria

  • User can review generated plan before execution
  • User can approve plan to start execution
  • User can cancel plan to abort without traceback
  • User can request changes with text feedback
  • AI regenerates plan incorporating user feedback
  • Feedback loop limited to prevent infinite iterations
  • Plan is read-only (no manual editing)
  • Optional checkboxes for step-by-step approval
  • Step approval UI for web/coding operations (when enabled)
  • Graceful cancellation with user-friendly message

Benefits

  • User Control: Users decide what gets executed
  • Safety: Sensitive operations require explicit approval
  • Efficiency: Catch plan errors before wasting compute
  • Flexibility: Refine plans through natural language feedback
  • Better UX: No technical errors shown to users

Labels

enhancement feature-request ux frontend backend

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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