claude-code - 💡(How to fix) Fix Automated QA workflows blocked by per-command approval — need batch/session approval mode

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

When using Claude Code to write and run automated QA test scripts (via GhostUI for macOS UI automation), every single Bash tool call requires manual user approval. For a 12-test suite where each test runs 5-15 shell commands, this means 60-180 approval clicks per test run, making automated testing impractical.

Root Cause

  • Permission settings: Even with broad bash permissions allowed, individual commands still prompt because they contain dynamic arguments or pipe chains
  • Writing to script files then executing: Reduces to one approval per script run, but debugging individual commands still requires approval each time

Fix Action

Fix / Workaround

Current Workarounds Attempted

RAW_BUFFERClick to expand / collapse

Summary

When using Claude Code to write and run automated QA test scripts (via GhostUI for macOS UI automation), every single Bash tool call requires manual user approval. For a 12-test suite where each test runs 5-15 shell commands, this means 60-180 approval clicks per test run, making automated testing impractical.

Use Case

I'm building a QA test framework that:

  1. Uses GhostUI CLI (gui) to inspect and interact with macOS app UIs via Accessibility APIs
  2. Runs bash test scripts that call gui commands (AX queries, CG clicks, screenshots)
  3. Iterates on test scripts — write, run, debug, fix, re-run

Each iteration requires dozens of bash commands: gui ax query, gui cg click, gui cg key, gui rec image, source helpers.sh && run_test, etc. Every one needs manual approval.

Current Workarounds Attempted

  • Permission settings: Even with broad bash permissions allowed, individual commands still prompt because they contain dynamic arguments or pipe chains
  • Writing to script files then executing: Reduces to one approval per script run, but debugging individual commands still requires approval each time

Requested Solutions

  1. Session-level approval: "Allow all bash commands for this session" toggle
  2. Pattern-based approval: Allow commands matching a pattern (e.g. gui *, source */helpers.sh *)
  3. Working directory scoping: Auto-approve commands that only read/write within the project directory
  4. Tool trust mode: A mode where the agent can freely run non-destructive commands (reads, queries, test runs) without approval, while still prompting for destructive ones (git push, rm, etc.)

Impact

The per-command approval requirement makes Claude Code unsuitable for iterative test development and automation workflows. Each debug cycle takes 10x longer than necessary because the human bottleneck is clicking "approve" rather than analyzing results.

Environment

  • Claude Code CLI (latest as of 2026-05-18)
  • macOS 15.7.5
  • Used with GhostUI for macOS UI automation

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Automated QA workflows blocked by per-command approval — need batch/session approval mode