Skip to content

Add an "Approve and Run" action for assistant-suggested terminal commands in the Control UI #55743

Description

@TEEllis22

Summary

When the assistant suggests shell commands in chat, the current workflow often requires the user to manually copy/paste those commands into Terminal. This creates unnecessary friction, especially during troubleshooting, setup, and iterative admin work.

A better UX would let the Control UI show suggested commands in a structured command card with actions like:

  • Copy
  • Approve and Run

This would preserve human approval while significantly reducing repetitive copy/paste.

Problem

In practice, many OpenClaw sessions involve a repeated loop like this:

  1. Assistant says: “Run in Terminal on the Mac Mini:”
  2. Assistant prints command block
  3. User copies command
  4. User pastes into terminal
  5. User sends output back into chat
  6. Repeat many times

This works, but it becomes tedious fast.

The assistant may already have enough context to safely execute many low-risk local commands, but there are still important categories where explicit human approval should remain part of the workflow.

Requested UX

When the assistant includes a shell command in chat, render it as a command card with:

  • exact command text
  • working directory / host
  • risk classification
  • action buttons

Suggested buttons:

  • Copy
  • Approve and Run
  • Cancel

Possible future expansion:

  • Approve Once
  • Approve for This Session
  • Approve for This Repo/Directory
  • Deny

Risk Labels

Suggested labels or badges:

  • Read-only
  • Changes local files
  • Changes config
  • Restarts service
  • External/network action
  • Potentially destructive

This helps the user understand what is being approved.

Safeguard Expectations

The UI should preserve strong approval semantics:

  • show the exact command before execution
  • do not mutate the command silently
  • show the working directory / host target
  • require explicit confirmation for risky operations
  • make destructive/external commands visually distinct

Why This Matters

Benefits

  • reduces repetitive copy/paste during debugging and setup
  • keeps the human in the loop
  • lowers friction without removing safeguards
  • makes OpenClaw feel more like an active operator console and less like a copy/paste assistant

Example high-friction workflows

  • troubleshooting OpenClaw config/session/channel issues
  • checking status, logs, config, sessions, cron
  • iterative GitHub/git operations in a repo
  • local automation setup and validation

Suggested Execution Model

A good initial model might be:

  • assistant proposes command
  • UI renders a command card
  • user clicks Approve and Run
  • runtime executes exact command
  • output is streamed back into the conversation

For sensitive commands, the UI could optionally require a second confirm step.

Nice-to-Have Additions

  • show whether the command is expected to be local-only or external
  • show whether the command may expose private data
  • let users set default behavior for low-risk local commands
  • allow “always ask” and “trusted safe commands” policies

Short Version

OpenClaw Control UI should support:

  • Copy for suggested commands
  • Approve and Run for user-approved execution

That would materially improve usability while preserving safety.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions