▶ Classic

Claude Auto-Accept

Personal Product Jun 2026
Expect Tcl Shell Claude CLI macOS Developer Tools

Problem Statement

The Claude CLI stops on every action to ask "Do you want to proceed?". There's an official escape hatch — the --dangerously-skip-permissions flag — but many corporate IT policies lock it down for safety. So developers are stuck pressing Enter hundreds of times a day, constantly breaking their flow.

Solution

Claude Auto-Accept is a tiny Expect script that wraps the Claude CLI. It watches the terminal, and the moment the permission prompt appears, it presses Enter for you. You use Claude exactly the same way — just type claude-auto instead of claude — and the prompts handle themselves.

  • No flag required — works even when --dangerously-skip-permissions is disabled by IT policy
  • Transparent wrapper — same commands, same behavior, just without the interruptions
  • Built on Expect — ships with every Mac, no extra dependencies to install
  • Pattern-matched — recognizes the prompt via a regex you can edit if the CLI's wording ever changes

How It Works

Expect spawns the Claude CLI as a child process and listens to its output stream. When it matches the (?i)Do you want to proceed\? pattern, it waits a beat and sends a carriage return — the same keystroke you'd type by hand.

  • Setupchmod +x claude-auto.exp, then alias claude-auto to the script in your ~/.zshrc
  • Usage — run claude-auto in place of claude. The prompt flashes for a fraction of a second, then auto-confirms
  • Customization — if the prompt wording changes, edit one regex line to match the new phrase

Key Product Decisions

  • Wrap, don't fork. Patching the CLI or shipping a custom build would break on every update. A terminal-level wrapper stays compatible no matter what Claude does internally
  • Use what's already there. Expect is preinstalled on macOS. Zero dependencies means anyone on the team can adopt it in under a minute
  • Stay editable. The matched phrase lives in a single, commented regex line so a non-engineer can fix it when the prompt text shifts
  • Respect the guardrail's intent. This solves the ergonomics problem for trusted local work without asking IT to weaken a policy that exists for a reason

Impact & Metrics

0 Deps
Built on Expect, preinstalled on every Mac
1 Alias
One-line setup, then claude-auto replaces claude
Open Source

Lessons Learned

  • The best fix is often the smallest one. A 20-line Expect script solved a daily friction point that no config flag could, because the flag itself was off-limits
  • Meet constraints where they are. Fighting the IT policy was a dead end. Working at the terminal layer sidestepped it entirely while keeping the policy intact
  • Old tools still win. Expect has been around since 1990. For "watch a terminal and press a key," nothing newer is simpler

Arush Sharma Arush Sharma click anywhere to close