AI Permission Review: who answers when your agent asks
On this page
- It starts only when an agent stops and waits
- It reads the current prompt, not the scrollback
- The blacklist runs first, on your phone
- The allowlist decides without the AI
- What does the AI decide?
- Advisor suggests, Auto Reply presses the key
- When does it hand the prompt back to you?
- How do I turn it on?
- What data leaves your device?
AI Permission Review answers the permission prompt an agent raises when you are not looking at the screen. A blacklist blocks dangerous commands first, an allowlist passes the commands you already trust, and an AI judgement decides the rest. The session's mode then decides whether it only suggests the key or presses it for you.
Halfway through a task the agent stops and asks "Run this command?" You happen to be away from the screen, and the whole job waits on one key press.
AI Permission Review exists for that moment. It answers the prompt, one key at a time. It does not type the command, and it does not touch anything else on the screen.
- The agent stops and waitsAgentmux detects a permission prompt
- Read the screenFind the current prompt and redact sensitive text
- BlacklistA dangerous command matchedHanded to you
- AllowlistA command you trust matched; pick the key locally
- AI judgementAllow, deny, or unsureDeny or unsure: handed to you
- Re-check before sendingIf the screen changed, nothing is sentHanded to you
- Suggest, or press for youDepends on the mode you picked
It starts only when an agent stops and waits
Agentmux already tracks the state of agents like Claude Code and Codex. When a prompt such as "Allow this?" or "Pick 1 or 2" appears on screen, the session is marked as waiting, and the review starts from there.
These also need to be true:
- The AI Permission Review switch in Settings is on.
- The session's mode is Advisor or Auto Reply, not Off.
- You have Pro, or you're still in the free trial.
Each prompt is judged once, and Agentmux does not re-run that check every few seconds. If you press a key or type in the terminal yourself, it cancels the review in progress and takes your input instead.
Switch to another tab and the review keeps running in the background, on the sessions you are no longer looking at.
It reads the current prompt, not the scrollback
It picks out the prompt currently on screen: the command to run, the question itself, and the choices offered. Anything that has already scrolled up does not count.
Before the screen goes to the AI, Agentmux redacts anything that looks like a password, API key, or token. If that redaction fails, the text is not sent and no key is pressed this time.
The blacklist runs first, on your phone
Your phone does the matching, and the blacklist runs before anything else. A match is never sent to the AI: the prompt comes straight to you. The built-in rules cover the most dangerous kinds of operations:
rm -rfon/,~, or your home directorysudogit push --force(--force-with-leasedoesn't count)DROP TABLE,DROP DATABASE,TRUNCATE TABLE- Piping something downloaded straight into a shell, like
curl … | sh - Commands that write directly to a disk, like
mkfsanddd if=
You can edit or remove these built-in rules, and add your own.
The allowlist decides without the AI
Some commands you approve every day, like a test run or a build. Add them to the allowlist and the next match is settled on your phone. It picks the key locally, so there is no wait for the AI and no API usage.
In Auto Reply mode you can also turn on "Allow all commands in this session" for a single session. That skips the AI judgement. The blacklist still applies, and the setting turns itself off when the session ends.
If the allowlist matches but the screen shows no clear, safe key, the prompt comes to you instead.
What does the AI decide?
Only prompts that match neither list reach the AI. It gets the redacted screen plus your Main Intent, which is what you want the agent to do this time, for example "fix the login page tests".
You can choose between two engines:
- JEV decision engine (through OpenRouter or TypeSafe): built for terminal prompts, and fast. It decides in three tiers. Safe read-only operations are allowed. Commands that match your Main Intent are allowed. Everything else comes to you, whether it is unrelated, unclear, or high-risk. Anything that looks suspicious or like a malicious injection is denied outright.
- An OpenAI-compatible LLM: OpenAI, OpenRouter, or a model you run on your own machine.
The AI reaches one of three conclusions: allow, deny, or unsure. Only "allow" goes further, and the AI has to name the exact option on screen it wants to pick. It never picks a permanent grant such as "Always allow" or "Don't ask again".
Advisor suggests, Auto Reply presses the key
Each session has its own mode:
- Advisor (default): suggestions only. A notice at the top of the screen tells you what it recommends, with an Accept button next to it. Nothing is sent until you tap it.
- Auto Reply: when the verdict is allow, it presses the key for you and shows a notice saying which key it pressed.
Either way, it looks at the screen again right before sending a key. If the prompt changed, the options moved, or the cursor is not on the target, it sends nothing. The judgement takes a few seconds, and the prompt can change in that time, so the second look is what stops a wrong option from being pressed.
After Auto Reply sends a key, Agentmux waits 3 seconds before sending another one in that session.
When does it hand the prompt back to you?
- A blacklist rule matched.
- The AI said deny, or was unsure.
- It cannot tell which key the prompt wants.
- The choice is a permanent grant such as "Always allow".
- The screen changed before the key was sent.
- Redacting the sensitive text failed.
Then Agentmux alerts you the same way it would with the review turned off.
How do I turn it on?
Before you start, have one of these ready:
- An API key for the JEV engine, from OpenRouter or TypeSafe.
- Your own OpenAI-compatible LLM endpoint, such as the OpenAI API or a model running on your own computer.
- Open Settings → AI Permission Review and turn on the switch. The first time, you see an explanation of what data is shared. Tap to agree and it takes you to Advanced Settings.
- In Advanced Settings, choose an engine, enter your API key, and tap "Test AI Endpoint Connection" to confirm that it works.
- Back in Settings, pick a default under Permission Review Mode (Advisor is a reasonable start), then write your Main Intent.
- Connect to a server and start an agent. New tabs start in the default mode. To change the mode or the Main Intent for one session, tap the Permission Review button in the terminal toolbar. There you can also turn on "Use My Latest Prompt", so the Main Intent follows each prompt you send in that tab.
Run Advisor for a few days first and compare its suggestions with how you actually answer. Then turn on Auto Reply for the sessions where the pattern holds.
What data leaves your device?
Only two things leave it: the redacted text on screen and your Main Intent. They go to the AI service you set up, using your own API key. With "Use My Latest Prompt" on, the prompts you send in that tab become the Main Intent, so they are sent as well. Agentmux does not provide or relay an AI service. The record of each decision stays on your device, where you can review or clear it in the audit log. Model reasoning is not stored.