Automated QA workflows blocked by per-command approval — need batch/session approval mode
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:
- Uses GhostUI CLI (
gui) to inspect and interact with macOS app UIs via Accessibility APIs - Runs bash test scripts that call
guicommands (AX queries, CG clicks, screenshots) - 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
- Session-level approval: "Allow all bash commands for this session" toggle
- Pattern-based approval: Allow commands matching a pattern (e.g.
gui *,source */helpers.sh *) - Working directory scoping: Auto-approve commands that only read/write within the project directory
- 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
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗