How to Approve or Deny a Coding Agent Action from Your Phone

When your coding agent needs permission to write a file or run a command, Grass surfaces the request on your phone instantly. One tap to approve or deny — wherever you are.

When Claude Code wants to write a file, run a bash command, or fetch a URL, it pauses and waits for your approval. If you are not at your laptop, that pause can stretch into hours. Grass fixes this. The moment an agent hits an approval gate, a native modal appears on your phone — regardless of which screen you are on. One tap approves or denies it. The agent continues.

TL;DR

  • Claude Code runs in default permission mode: it pauses before file writes, bash commands, and URL fetches, and waits for your sign-off
  • Grass surfaces these approval requests as native modals on your phone the moment they arrive
  • The modal shows the agent, repository, action type, and full details of what is being requested
  • Approve or deny with one tap — the agent proceeds or skips the action accordingly
  • A global permission queue catches requests from all connected servers, not just the one you are viewing

What triggers an approval gate in Claude Code

Claude Code runs in default permission mode by default, as documented in the Claude Code permissions reference. In this mode, the agent pauses and requests approval before taking any action that modifies your system or makes an external request. The actions that trigger an agent approval gate include:

  • Writing or editing a file — any modification to the filesystem
  • Running a bash command — executing shell commands, including npm install, git commit, test runners, build scripts
  • Fetching a URL — any outbound HTTP request the agent makes to read documentation or an API
  • Creating or deleting directories

Read-only operations — reading files, listing directories, searching the codebase — do not trigger approval gates. The agent acts on these without asking.

A task that involves writing 20 files and running 5 bash commands will trigger up to 25 approval gates over its lifetime. For an overnight run, those gates arrive at unpredictable intervals. Without a mobile interface, each one is a potential hours-long stall.

How the Grass permission modal works

When an agent session connected to Grass hits an approval gate, the Grass server receives the permission request over the agent SDK event stream. It immediately forwards it to all connected Grass app clients via the /permissions/events SSE endpoint.

The Grass app's global permission manager subscribes to this stream across all connected servers. The first pending request in the queue triggers a native modal overlay — it appears on top of whatever screen you are currently on. You do not need to navigate to the right session or server. The modal surfaces automatically.

The modal shows:

  • Which server and repository the request is from
  • Which agent (Claude Code or OpenCode) is requesting
  • The action type — file write, bash command, URL fetch
  • The full details — for a file write, the file path and a diff preview of the proposed changes; for a bash command, the exact command string

Tapping Approve sends a confirmation back to the agent via POST /sessions/:id/permission. The agent proceeds immediately. Tapping Deny sends a rejection; the agent skips the action and continues with the rest of the task or reports that it could not complete the step.

After you handle one modal, the next pending request in the queue surfaces immediately if one is waiting.

Step-by-step: handling an approval gate from your phone

  1. Set up Grass before leaving your machine. Run npm install -g @grass-ai/ide, then grass start in your project directory. Start your Claude Code session and confirm the Grass app is connected.
  2. Let the agent work. You do not need to watch the session. Go about your day.
  3. When an approval gate triggers, your phone shows a modal. It appears automatically — you do not need to open the Grass app manually.
  4. Read the request details. The modal shows what action the agent wants to take and the full context: file path, command string, or URL.
  5. Tap Approve or Deny. The decision is sent back to the agent in under a second. The agent proceeds or moves on.
  6. If multiple gates are queued, handle them in sequence. After dismissing one modal, the next appears immediately.

What happens if you deny an action

Denying an approval gate does not stop the agent or end the session. Claude Code receives the denial and decides how to proceed based on the task context. Typical behaviours:

  • If the denied action was optional (e.g. fetching documentation it was using as reference), the agent continues without it.
  • If the denied action was required for the task (e.g. writing the output file), the agent reports that it could not complete the step and waits for further instruction.
  • You can send a follow-up prompt in the Grass chat explaining why you denied it and what to do instead — the agent will adjust.

Denying is not a hard stop. It is a signal. The agent handles it gracefully in most cases.

What you need

  • Grass CLInpm install -g @grass-ai/ide (Node.js 18+ required)
  • Grass mobile app — iOS App Store (native) or Android PWA
  • Claude Code — running in default permission mode (the default; no extra configuration needed)
  • An active Grass connection — the app must be connected to the server for modals to appear
  • Network access — same WiFi as your machine, or Tailscale for remote access

Frequently asked questions

How long does the agent wait at an approval gate before timing out?

Claude Code waits indefinitely at an approval gate — there is no built-in timeout. The agent will sit at a permission request until you respond, whether that takes 30 seconds or 8 hours. This means a missed approval gate does not fail the task; it just pauses it until you handle it.

What if I approve something I should not have?

If you approve a file write that turns out to be wrong, you can deny subsequent related actions and send a correction prompt in chat. Since Claude Code creates checkpoints during tasks, you can also run git diff HEAD in the terminal (or check the Grass diff viewer) to see what changed, then revert with git checkout if needed. Approving an action is not irreversible in most cases.

Can I see a preview of the file change before approving?

Yes. For file write actions, the permission modal in Grass shows a diff preview — the proposed changes in the file — so you can review what the agent is about to write before committing. For bash commands, you see the exact command string. For URL fetches, you see the target URL.

Does Grass show approval gates from all connected servers, or just the one I am viewing?

All connected servers. The global permission manager in the Grass app subscribes to the permission event stream from every server you are connected to. An approval gate from any session on any server surfaces as a modal, regardless of which server or session you are currently viewing in the app.

What is the difference between approving in Grass vs approving in the terminal?

Functionally identical — both send the same approval signal to the agent via the same API endpoint. The difference is context: in the terminal you type a response at a prompt; in Grass you tap a button on a modal that shows you the full details of what you are approving. For mobile use, Grass is significantly less friction and gives you more information at the point of decision.

Can I pre-approve certain types of actions so I do not have to handle every gate?

Not through Grass directly — permission decisions are made per-request. Claude Code does support a YOLO mode (--dangerously-skip-permissions flag) that bypasses all permission checks, but this removes the safety net entirely and is not recommended for general use. The better approach is to send a prompt at the start of the session scoping what the agent is allowed to do freely, which reduces the number of gates it hits.

Related use cases

Monitor a long-running coding agent overnight — The full overnight monitoring setup: how to stay connected to a running session, handle approval gates as they arrive, and recover if your phone disconnects.

Manage multiple agents from one mobile dashboard — When you are running several agents simultaneously, the global permission queue becomes critical. How it works across multiple server connections.

Review your agent code changes from your phone — After approving a series of file writes, use the diff viewer to inspect everything the agent changed in one place.