At 11:40pm my agent stopped mid task. No error in chat, no crash, no stack trace. Just a tool result that said status: "approval-pending", an approval id, and then silence. I had asked it to run a shell command to clean up a staging database. It had run variations of that command a hundred times before. That night it sat waiting for a permission I never saw requested.
If you have hit the same wall, the cause is almost never the command itself. It is one of three things. The approval prompt had nowhere to appear, so it was denied by default. The prompt expired before anyone answered it. Or a policy layer you forgot about decided the command did not match what you allowed. This is the walkthrough I wish I had at 11:40pm, including the part where I made it worse before I made it better.
My agent froze, and nothing in the chat explained why
The task was simple: read a CSV of test accounts, delete the matching rows from staging, report the count. The agent read the file fine. Then it called exec with a short mysql command, and the tool returned immediately with an approval id instead of a result.
That immediate return is the important detail. On node host and non-native gateway flows, OpenClaw does not block the tool call while a human decides. It returns status: "approval-pending" right away, and the command has not started. Native chat and Web UI clients behave differently: they can wait inline and hand back the final result after you approve. Mine was a chat-origin run with no approval card attached, so the agent got a pending id and nothing else. It had no way to know whether the command was queued, denied, or lost.
My first move was the wrong one. I assumed a stuck process and restarted the gateway. That cleared the pending request entirely without ever resolving it. The agent had already moved on and reported a vague failure, so I lost the evidence I needed.
Three fixes I tried that did nothing
I added the binary name to the allowlist. Bare command names only match commands invoked through PATH. My command used an absolute path to a wrapper script, and a bare name entry will never match /tmp/cleanup.sh or ./cleanup.sh. The allowlist looked correct in the UI and matched nothing.
I added python3 to tools.exec.safeBins. Safe bins are stdin-only stream filters, not a general allowlist for interpreters. They are explicitly not meant for runtimes like python3, node, ruby, or bash. jq is refused even when you list it, because it can read environment data. The audit command flags this mistake for a reason.
I ran /exec security=full in the session. This changes session state only, and the host approvals file can still be stricter. It also requires an authorized sender. So the session said full, the host file said ask, and the host file won.
How approvals actually resolve, and why your config is only half the story
Exec approval in OpenClaw is decided by two layers that are merged at request time. The first layer is your OpenClaw config: tools.exec.mode, or the legacy pair tools.exec.security and tools.exec.ask. The second layer is a small JSON file that lives on the machine where the command will actually run, at ~/.openclaw/exec-approvals.json unless OPENCLAW_STATE_DIR points somewhere else.
The merge rule is the whole game: the effective policy is the stricter of the two. The host file can tighten your config, but it can never loosen it. A per-agent entry in that file also wins for that agent, and a host-local ask: "always" keeps prompting even if your session asked for on-miss.

This is where most people get confused, because the defaults are not what they expect. On a gateway or node host, if you never set anything, tools.exec.security resolves to full and tools.exec.ask resolves to off. A fresh install does not prompt at all. A sandbox host defaults to deny instead. So if your agent is suddenly asking for approval, something set a stricter value somewhere, or the command is running on a different host than you think.
Here is the actual state of my machine when I finally looked. The approvals file exists, and it is empty:
An empty file is not a broken file. It means every field inherits, and inheritance landed on security=full plus ask=off. No prompts, no stalls. That told me my problem was not the local policy at all. It was the host the command was routed to.
The five modes worth knowing are deny (exec blocked), allowlist (only allowlisted or safe-bin commands, no prompts), ask (allowlist matches run, everything else asks a human), auto (same as ask, but a native reviewer checks misses before a human is bothered), and full (no gate). Setting tools.exec.mode derives the security and ask values for you and cannot be combined with them explicitly.
There is one more field that caused my silent failure: askFallback. It decides what happens when a prompt is required but no UI can answer, or the prompt times out. It defaults to deny. On a headless VPS, a cron run, or a channel where approvers never resolved, that means the command is denied with no visible message in your chat. It looks exactly like a hang.
The fix, in the order I should have done it
Step 1: read the effective policy before touching anything. Run openclaw approvals get on the machine that runs the command. Use --gateway or --node <id> when the work happens elsewhere. The table shows three columns: what config requested, what the host file enforces, and the merged result. That single view answers most “why is it asking” questions.
Step 2: identify which layer is stricter. If the Requested column already says ask=on-miss and you never set it, check tools.exec in your config and any per-agent overrides under agents.list[].tools.exec. If the Host column is stricter, edit the approvals file or use openclaw approvals set. Do not keep flipping config values and restarting. The stricter layer does not care.
Step 3: fix the no-UI case. If the command runs where nobody can tap a button, decide what should happen on a miss. Leaving the default deny is safe but silent. Setting askFallback to allowlist lets known commands through. Setting it to full means a miss runs anyway, which is a real security decision, not a convenience toggle.
Step 4: route approvals to a chat you actually read. This is the part that fixed my setup. Approval forwarding is its own config block, separate from exec policy, and it supports session delivery, fixed targets, or both:
{
approvals: {
exec: {
enabled: true,
mode: "session",
agentFilter: ["main"],
targets: [
{ channel: "discord", to: "123456789012345678" }
]
}
}
}
With mode: "session", the approval prompt goes back to the chat where the request started. Discord, Slack, Telegram, Matrix, and QQ bot can also render native approval cards with buttons. Discord and Telegram still check the resolved approver list even when native delivery is off, so adding a target does not let anyone approve anything.
Step 5: make the allowlist match reality. Use a path glob for one specific binary, such as ~/Projects/**/bin/rg, and add argPattern when only certain arguments should pass. Remember that allowlists are per agent, and that chained commands need every top-level segment to match. Redirections are not supported in allowlist mode at all. A command that works alone can fail purely because you appended && date.
Step 6: treat interpreters carefully. If you allowlist python3, turn on tools.exec.strictInlineEval. Inline forms like python -c, node -e, and osascript -e can hide arbitrary code inside an allowed binary, so strict mode makes them approval-only and stops allow-always from persisting them as trusted rules.
Once you approve with /approve <id> allow-once, the command runs under the exact argv, working directory, and environment that were recorded when the request was created. That binding is deliberate. If the script file changes between approval and execution, the run is denied instead of executing drifted content.

Common mistakes that keep the gate shut
- Assuming approval is off because config says full. The host approvals file is enforceable and can be stricter. Check the Host column, not just your JSON.
- Trusting a chain with allow-always. Durable trust covers the shape that was approved, not every future combination. A new
&&segment is a new miss. - Editing the command after the request is created. Changing the command, cwd, agent id, or session key after the approval is issued gets the forwarded run rejected as an approval mismatch.
- Waiting for a denial message in a subagent or cron session. Denials are posted back to main sessions with an origin, but not to subagent or cron sessions. The job simply ends without the command ever running.
- Leaving
askFallbackat deny on a headless box. If nobody can see the prompt, deny means silent failure. Decide that on purpose. - Forgetting the 30 minute clock. Pending approvals expire after 30 minutes by default and become a terminal denial. Approve the id you were actually given, not one from an earlier run.
If your hosting is the bottleneck: Kinsta keeps your site safe with automatic daily backups and one-click restore, so a bad update or a hack is a rollback, not a rebuild. Their support is top tier, and 24/7 live chat is staffed by WordPress engineers who will help fix the actual problem with you, so you are not stuck waiting on your developer to reply. Plans start at $35 per month.
That backups point matters more once you relax approvals. If you are going to let an agent run with security=full and ask=off, the recovery path has to exist before the first destructive command, not after. I learned that one on a database I could restore in four minutes instead of four hours.
What changed after the fix
A week later the same cleanup task ran four times with no stalls. Approval requests now land in the chat where the task started, with buttons, and I see the exact command before anything executes. The allowlist covers three specific binaries by path, not by bare name. The headless box that runs scheduled jobs has askFallback set to allowlist deliberately, so a scheduled job either matches a known pattern or fails loudly instead of hanging.
The bigger lesson is that approval is not one setting. It is a request, a decision surface, and an expiry clock, and all three have to be healthy. When one is missing, the agent does not complain. It just stops, and you spend an hour blaming the command.
The approval request was created but no approval surface could deliver or answer it. On a headless host, a cron run, or a channel with no resolved approvers, OpenClaw falls back to askFallback, which defaults to deny. The command never starts and no denial reaches the chat. Check openclaw approvals get for the Host column and the askFallback value, then forward approvals to a chat you read.
Pending exec approvals expire after 30 minutes by default. When that happens the request is treated as an approval timeout and becomes a terminal denial for the host command. Approve the specific approval id that was issued for that run. Ids from earlier requests will not resolve.
Yes. Same-chat approvals work with /approve <id> allow-once, /approve <id> allow-always, or /approve <id> deny. Discord, Slack, Telegram, Matrix, and QQ bot can also render native approval cards with buttons. Discord and Telegram still authorize against the resolved approver list, so not everyone in the channel can approve a command.
Only if you accept that exec runs without any human gate. That setting is already the default for gateway and node hosts, which is why many people never see a prompt. If you want a middle ground, use allowlist with ask on-miss so known commands run directly and everything else asks. Remember that the host approvals file must also be opened, because it can only tighten your config.
The most common causes are an approval mismatch, where the command, cwd, agent id, or session key changed after the request was created, and file drift, where the script changed between approval and execution. Chained commands also fail when one top-level segment is not allowlisted, and inline forms like python -c need explicit approval when strictInlineEval is enabled.
Read our guide to AI agent guardrails, covering approval gates, spend caps, and the difference between instructions the model can ignore and limits the runtime enforces.
Read the Guardrails GuideFinal thoughts
An approval stall is not a bug in your command. It is one of three things failing quietly: no decision surface, no decision before the clock ran out, or a policy layer stricter than the one you were staring at. Read the effective policy first, then fix the layer that is actually enforcing the rule.
If you are still tuning tool permissions after this, the related problem is usually selection rather than approval: the agent has the tool but never reaches for it. That is a different failure with a different fix, covered in OpenClaw not using your skills or tools. And if approvals keep timing out on scheduled work, check why cron jobs never fire before you touch the allowlist again.

