How to Monitor a Long-Running Coding Agent Overnight

You don't have to sit at your laptop while your coding agent works. Grass lets you monitor it, handle approval gates, and check progress from your phone — overnight or anywhere.

It's 10pm. You kicked off a Claude Code session to refactor your auth module — a job that'll take a while. You don't want to sit at your desk watching it run, but you also don't want to wake up to a stuck agent that's been waiting hours for your approval. Grass solves this. Install the CLI on your machine, scan the QR code with the Grass mobile app, and you'll get live agent output and approval prompts on your phone all night — no laptop required.

TL;DR

  • Claude Code's 99.9th percentile turn duration exceeded 45 minutes as of early 2026 — long enough that overnight runs are common
  • Grass streams live agent output to your phone over SSE, so you see exactly what the agent is doing
  • Permission modals appear on your phone the moment an agent hits an approval gate — one tap to approve or deny
  • Sessions survive phone disconnects; reconnect and the full history replays
  • Works over your local network, or remotely via Tailscale

Why overnight agent runs need a dedicated monitoring solution

According to Anthropic's research on agent autonomy, the 99.9th percentile turn duration in Claude Code sessions grew from under 25 minutes in late 2025 to over 45 minutes by early 2026. That's a single turn. A full feature build — with planning, implementation, test runs, and fixes — can run across many turns and take several hours.

Leaving an AI coding agent running overnight makes sense. But agents aren't fully autonomous. Claude Code runs in default permission mode, which means it will pause and wait for your approval before running certain tools — writing files, executing bash commands, fetching URLs. If you're not watching, an agent can sit stuck at an agent approval gate for hours.

The alternative — keeping your laptop open all night, occasionally glancing at the terminal — isn't realistic. You need a way to stay connected to the session without being at your desk.

How Grass keeps you connected to an overnight agent run

Grass has two parts: a CLI server that runs on your machine alongside the agent, and a native mobile app (iOS App Store; Android via PWA) that connects to it.

When you run grass start in your project directory, Grass spins up an HTTP server on a port in the range 32100–32199 and displays a QR code. Scan that with the Grass app and your phone is connected to the session. From there:

  • Live output streams to your phone. Agent responses arrive over Server-Sent Events (SSE) with full markdown and syntax highlighting. You see the same output you'd see in the terminal, rendered cleanly on your phone screen.
  • Permission modals appear immediately. When the agent hits an approval gate — a file write, a bash command, anything requiring your sign-off — a native modal appears on your phone regardless of which screen you're on. The global permission manager surfaces the first pending request across all connected servers. One tap approves or denies it.
  • Sessions survive disconnects. If your phone loses the connection overnight, nothing is lost. Each SSE frame carries a sequence number. When you reconnect, the app replays any events you missed using the Last-Event-ID header. The agent's history is fully restored.

This is what mobile coding agent access looks like in practice — not a read-only status dashboard, but a live, interactive connection to a running session.

Step-by-step: setting up overnight monitoring with Grass

  1. Install the Grass CLI. Run npm install -g @grass-ai/ide on your machine. Requires Node.js 18+.
  2. Start a Claude Code session. Navigate to your project directory and kick off the task you want to run overnight using Claude Code.
  3. Run grass start. In the same project directory (or its parent), run grass start. Grass auto-selects an available port from 32100–32199 and prints a QR code.
  4. Scan the QR code with the Grass app. Open Grass on your phone (iOS App Store; Android PWA), tap the QR scanner, and scan. Your session appears immediately.
  5. Select your repo and agent. In the Grass app, tap the server, select your repository, choose Claude Code as the agent, and open the active session.
  6. Go to bed. Agent output streams to your phone. If the agent hits an approval gate, you'll get a permission modal. Tap approve or deny. The agent continues.
  7. Check progress any time. Open the app, see the full session history, browse diffs, check which files changed. No laptop needed.

What about remote access — what if my machine isn't on the same network?

If you want to check on an overnight agent run from a different network — a coffee shop the next morning, or anywhere outside your home WiFi — use Tailscale. Run grass start --network tailscale instead of the default grass start. Grass will print a QR code using your Tailscale IP. As long as both your machine and phone are on the same Tailscale network, the connection works identically.

Alternatively, for fully remote setups, run the agent on a transient dev server like Daytona instead of your laptop. The agent runs in the cloud, your laptop can stay off, and Grass on your phone connects to the Daytona workspace directly. Use grass start --network remote-ip to generate a QR code with the correct external address.

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 or OpenCode — installed and authenticated on your machine, or running on a Daytona workspace
  • Network — phone and machine on the same WiFi, or connected via Tailscale for remote access
  • Pricing — free for local use; Daytona remote usage includes free credits

Frequently asked questions

How do I know if my Claude Code agent got stuck overnight?

Grass streams all agent output to your phone in real time. If the agent is stuck at an approval gate, a permission modal appears on your phone immediately — it doesn't wait for you to open the app. If the agent is simply running a long command, you'll see the status indicator in the chat screen. Open the app at any point to see the full session history.

What happens if my phone loses connection while the agent is running?

Nothing is lost. The agent keeps running on your machine regardless of whether your phone is connected. When you reconnect, Grass replays any missed events using SSE sequence numbers and the Last-Event-ID header. Claude Code sessions are also backed by .jsonl transcript files at ~/.claude/projects/<cwd>/<session-id>.jsonl, so history persists even across restarts.

Can I send new instructions to the agent from my phone overnight?

Yes. The Grass chat interface is bidirectional. You can type a new prompt from your phone — to redirect the agent, clarify a requirement, or ask it to try a different approach — and the agent responds in real time. This is the key difference between Grass and a read-only log viewer.

Does Grass work with OpenCode as well as Claude Code?

Yes. When you open a repository in the Grass app, an inline agent picker lets you choose Claude Code or OpenCode. Everything in this guide applies equally to both. OpenCode sessions auto-reconnect after 2 seconds if the stream drops.

How do I resume a Claude Code session the next morning?

If the session is still running, open Grass and it's already there. If the session completed overnight, use claude --continue in the terminal to resume from the last session, or claude --resume <session-id> to pick a specific one. Claude Code stores full session transcripts at ~/.claude/projects/<cwd>/<session-id>.jsonl.

Is it safe to leave Grass running overnight on my home network?

Grass has no authentication by default — anyone who can reach the port on your network can interact with the session. On a trusted home network this is generally fine. For anything sensitive, or for remote access, use Tailscale: grass start --network tailscale generates a QR code tied to your Tailscale IP, restricting access to devices on your private network.

Related use cases

Approve or deny a coding agent action from your phone — A closer look at how the permission modal works, what types of tool actions trigger it, and how to handle a backlog of pending approvals.

Manage multiple agents from one mobile dashboard — If you're running more than one overnight agent, Grass's multi-server support lets you monitor all of them from a single app. Covers how to set up multiple grass start instances and switch between sessions.

Connect Grass to Daytona — If you want the agent to keep running even when your laptop is off, Daytona is the answer. This guide walks through the full remote setup.