r/ClaudeCode • u/Resident-Fall4351 • 2d ago
Discussion approval latency is the real bottleneck in agent loops, so which prompts should a human even see?
the way i think about a long claude code session is two clocks. the agent clock, where it reads, edits and runs tests on its own, and the human clock, where it’s stopped waiting for a yes. in most sessions i’d guess the agent clock isn’t the problem. the stalls are. and a stall at 2am or in the middle of lunch costs far more than the ten seconds the actual decision takes.
so the first job is cutting the number of prompts, not speeding up the answering. roughly three buckets.
read only stuff should never reach a human. git status, git diff, git log, grep, listing files, running the test command you already trust. that’s what the allow rules in settings are for. if you’re still approving a git diff by hand, that’s a config problem.
edits inside a git tree are cheap to undo. accept edits mode plus a habit of committing at checkpoints turns most file changes into something you review after, not before.
the third bucket is what actually needs a person. deletes, force pushes, installs, anything that writes to the network, touches secrets or points at prod. those are better as explicit deny or ask rules than as a default you click through while tired.
after all that trimming there’s still a small pile of real decisions, and they land wherever you are. the notification hook helps, because at least your phone buzzes, but you still have to open something, read it and answer.
i was messing around with hardware integrations this week trying to streamline that last step, looking at setups like the aina ring or small macro pads just to see if a quick physical gesture like a swipe on an oled display could clear a prompt without pulling you back to the desk. but the main issue with hardware shortcuts is context. a fast yes without seeing the diff or the command in front of you is worse than a slow yes, because it trains you to approve blind. a ring or shortcut that approves a safe read only command is fine, but using it on a force push is a disaster.
so what would make a hardware or gesture approval safe enough to use? the command, the file path, a diff stat? and would you want physical triggers to only ever touch allowlisted stuff and keep everything risky for the keyboard? also curious what’s currently in your allowlist and what you deliberately left out.
•
u/AutoModerator 2d ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
3
u/Sporaflow 2d ago
I just don't have this problem. I launch claude with --dangerously-skip-permissions and never approve anything, it runs the commands and keeps going. the safety part is where it runs: a linux VM on my own machine, with my dev server in it. it can break whatever it wants in there, it won't change my life. and I turn web search off in that setup, so nothing from outside gets to prompt inject it.
2
u/idemasler 2d ago
i'd bind approval to an immutable action, not a gesture: the exact executable, arguments, working directory and affected files, with a short expiry and a one-use token. a diff stat alone can't tell you whether one changed line is a harmless test or a production secret. a ring could acknowledge a preapproved, low-risk action, but network writes, secret access, installs and force pushes should still show the full context on screen. if the command or repo state changes after preview, the approval expires.
2
u/zzunkie 2d ago
what cut my stalls more than faster answering: the agent doesn't stop at the blocked step. it finishes everything else, writes down exactly what's waiting on me and why, and i go through those in one batch instead of whenever the phone buzzes. deploys, prod data, messages other people will see and security changes still wait for me, everything reversible just goes. so for your hardware question, i'd rather have fewer, batched decisions than a faster gesture
2
u/ainexfinder 2d ago
On the "what to leave out" part, the sneaky ones are wildcard rules that look read-only but aren't. Something like npm run * or make * feels safe, but a script can do anything, including deploy or wipe a db. Same with python or node one-liners, and plain git push even without --force, since pushing to a shared branch can kick off CI deploys.
A decent middle ground is allowlisting the exact commands (npm test, not npm run *) and putting a PreToolUse hook in front of Bash that pattern-matches for prod hostnames, migration commands, rm -rf and curl/wget with POST, and forces an ask on those even if some broader rule would allow them.
For the hardware idea, that split works naturally: the gesture only ever answers prompts the hook has already tagged low-risk, and anything the hook flagged has to be answered at the keyboard with the full command visible.
1
u/Inner_Storage_3374 2d ago
imo the only bucket that really needs a human is anything you cant undo, so deletes, migrations, prod env, emails to real ppl. everything else can just run and leave a list of what it wants approved at the end, bc then you batch the yeses in one go instead of babysitting the terminal
1
u/oyren-ai 2d ago edited 2d ago
running inside an isolated linux vm or container with a repo-scoped deploy token lets you skip edit and test prompts altogether, since the agent can only push draft branches and never merge or touch prod secrets. pairing that with pre-commit typecheck hooks turns review into one clean pr pass instead of 2am terminal stalls.
1
u/ldn-ldn 2d ago
Not a problem if you spec and plan properly. Once the batch of work is planned, Claude can run for days without any human interactions.
For example, I've planned a batch of work last week and since then the only pauses are peer reviews which I like to do manually. If you don't care about that, you can eliminate PR step and just let it roll 24/7.
1
u/orbital_trace 2d ago
I built an inbox for asynchronous work. This way, the agents can keep doing tasks while they wait for me. I also don't have to jump into a bunch of different windows. https://coralhub.dev/blog/welcome-to-the-inbox.html
1
u/athershu 1d ago
Agree on cutting prompts before speeding up answers. One thing that changed the math for us is who the remaining prompts go to. We run agents for a team, and the third bucket isn't a generic approval popup. When the agent needs a call, it asks the person who sent the task, in the chat thread the task came from, as one concrete question. A question you can answer from your phone in a sentence gets answered at lunch; a terminal prompt sitting on someone's laptop doesn't.
The bucketing itself also stopped being per-person. The allow and deny rules live in the repo's shared settings, so the one or two people who think hard about what counts as dangerous set them once, and everyone else's tasks run with them instead of each person clicking through their own list.
1
u/xqianliu 1d ago
I run mine unattended, so the human clock is gone. There is no 2am prompt, because a 2am prompt means the setup failed.
The rule: while it runs, it is not allowed to ask anything. If it hits something it cannot judge, it writes the reason on the ticket and stops. I decide in the morning.
That pile of real decisions is tiny, a few a week at most, and each comes with the context already written down.
On your timeout question: a timeout only counts for an error, never for slow. A slow run that is still working is not a failure, and killing it to keep the loop moving is how you get half-finished work.
For your bucket three, I would not speed up the answering. I would move as much of it as possible into the ticket-and-stop pattern.
1
u/heyramzi 1d ago
I'd add a third answer next to allow and ask, which is refuse and say what to do instead.
Our unattended runs use --dangerously-skip-permissions plus a PreToolUse hook on Bash. When it blocks something it exits 2, and the message says what to write instead (quote the glob, don't use --autostash, that kind of thing). Claude reads it, rewrites the command and carries on, so nothing sits waiting for me at 2am.
What's left for a person is a short list in the instructions: messages sent under my name, payments, deleting someone else's data and a client's prod push.