Guide

Getting Claude Code or Codex to tell your phone when it’s done or needs you

Nightdesk for Mac and Linux is an MCP server. Connect it to Claude Code or Codex with one line, and the agent can notify your Android phone when it’s done, or send it a file, a link or some text. Nightdesk also watches the sessions itself and tells your linked phone when one stops to wait for you, and the agent’s answers are keys on the phone.

By Sheroze, who built Nightdesk · All guides

01Set it up

Four steps, once

  1. Install Nightdesk on the computer

    On a Mac, download it from the Mac page (macOS 14 or later) and allow Screen Recording and Accessibility. On Linux with GNOME, it’s one command. It’s free on the computer. The MCP server came with version 1.39.

  2. Pair your Android phone

    Install Nightdesk from Google Play (Android 12 or later) and scan the code your computer shows.

  3. Connect the agent

    Run the line below for Claude Code, or add the lines below to Codex’s settings. Nightdesk has to be running on the computer; the agent starts the small bridge to it by itself. Nightdesk’s window shows the same lines under AI assistants, with Copy.

  4. Try it

    In a session, ask “notify my phone that this works.” The notification arrives on the phone under From your computer.

Claude Code on a Mac

claude mcp add nightdesk -- /Applications/Nightdesk.app/Contents/MacOS/Nightdesk --mcp

Codex on a Mac

~/.codex/config.toml
[mcp_servers.nightdesk]
command = "/Applications/Nightdesk.app/Contents/MacOS/Nightdesk"
args = ["--mcp"]

On Linux, Claude Code’s line is claude mcp add nightdesk -- ~/.local/bin/nightdesk-host mcp. The AI assistants page has every client, Claude Desktop included.

02Asking for it

Ask in a prompt, or once for good

The tool is called notify_phone. It takes a title of up to 80 characters and up to 1,000 characters of text, and the phone shows them as a notification from your computer. Ask for it in your own words: “when the suite is done, notify my phone with the result,” or “notify my phone if the build fails.”

To have it every time, tell the agent once. Claude Code reads CLAUDE.md and Codex reads AGENTS.md when a session starts, so a line like this in either saves asking:

CLAUDE.md or AGENTS.md
When you finish a task, or stop to ask me something, call notify_phone with one line on what happened.

Its partner, send_to_phone, hands things over the other way. Files land in Download › Nightdesk on the phone, text arrives with a Copy button, and a link opens with a tap. That’s how “build a debug APK and send it to my phone” ends with the APK on the phone. It goes to a phone that’s linked right now.

03When it needs you

When the agent stops to ask

An agent waiting at a permission prompt can’t call a tool: it’s waiting for you. Nightdesk covers that part on its own. It sees every Claude Code and Codex session on the computer and what each one is doing (working, needs you, done), and while your phone is linked, a session that starts waiting makes the phone buzz in Control Deck, or posts a notification if Nightdesk is in the background. Settings › Control Deck › Agent alerts sets when: When one needs you (how it starts), When one needs you or finishes, or Off.

That’s exact for Claude Code 2.1 and later, with no setup. Other tools are read from their terminal’s title, or exactly with an optional hook. For Codex, this line at the top of ~/.codex/config.toml, above any [section], tells Nightdesk the moment each turn ends (Codex takes one notify command, so it replaces one you already have):

~/.codex/config.toml
notify = ["/Applications/Nightdesk.app/Contents/MacOS/Nightdesk", "--agent-hook"]

Answering from the phone

  • Agent keys. When Claude Code, Codex or another coding tool is in the terminal in front, keys appear above the dock: Stop, Mode, /compact, /model, /usage and the 1, 2 and 3 answers. A tap types the command, and holding it types and sends it.
  • The Agents page. Control Deck has a key for each session, named by its project and lit by what it’s doing. Tap one to bring its terminal to the front. Yes, Always and No answer whichever session has waited longest.
  • Write. A longer reply, typed or dictated, lands in the terminal in one piece.

Control Deck, agent keys and your assistant’s notifications: on Android now, coming to iPhone and iPad.

Nightdesk on a phone held sideways: Claude Code asks “Do you want to proceed?”, with Stop, 1, 2, 3, Mode and /compact keys below.
Claude Code waits for an answer, and the answers are keys. A capture of the Android app.

04Good to know

What happens when you’re away

When the phone isn’t linked

Nightdesk doesn’t send notifications through Google’s push service. They reach the phone over its own encrypted link, so they show at once while the phone is linked: Nightdesk open, or left less than a minute ago. Otherwise your computer keeps them (up to 20 for each phone, for 7 days) and the phone shows them the moment it next links. Agent alerts come only while the phone is linked.

So it’s at its best when you’re checking in through the day. If you need a buzz in your pocket at any moment with Nightdesk closed, a push service does that better (below).

What the tools never do

No Nightdesk tool runs a command, types, clicks or presses a deck key. The agent already works on your computer; Nightdesk only looks after the phone and its Control Deck. Notifications and sends are capped at 30 a minute.

Private

Nightdesk notes which tool was used and how it went, never a notification’s words or a file’s contents. The MCP server answers only on the computer itself, unless you turn on Use from ChatGPT for assistants on the web, and the link to your phone is end-to-end encrypted.

05Other options

Other ways to hear from your agent

Claude Code’s hooks can run a command when it stops or needs you, and Codex’s notify setting runs one at the end of each turn. Point either at a push service like ntfy, which is free and open source, or Pushover, a paid app, and your phone gets a notification anywhere, whether Nightdesk is open or not. If a notification is all you want, that’s the simpler setup.

What Nightdesk adds is what comes after the buzz. You open it, the whole computer is there with the agent’s answers as keys, and you can read the diff or check the page it built before you reply. The guide to Claude Code and Codex from your phone covers that part, and Anthropic’s and OpenAI’s own phone apps.

What it looks like on an ordinary day

Get a buzz on your phone when the tests pass

6:12 p.m.Mira, backend engineer

Mira left Claude Code fixing a flaky test and running the full suite, forty minutes of it, and ran for her train.

She didn’t want to keep linking in only to see whether it had finished.

How

  1. On her way out she adds a line to the prompt: “when the suite is done, notify my phone with the result.”
  2. The suite finishes while her train is in a tunnel. Her phone isn’t linked, so Nightdesk on her desktop keeps the notification for it.
  3. At the next stop she opens Nightdesk. As it links, the phone buzzes: “All 412 tests pass. Ready for review.”

No checking in. The news finds her.

Have Codex build your app and put it on your phone

1:40 p.m.Arjun, Android developer

Arjun asked Codex on his Mac to fix a crash in his app’s settings screen, then got pulled into a meeting two floors up.

He wants to try the fix on his own phone before anyone else does, and the build is on his desk.

How

  1. Nightdesk is linked on his phone. In Write he asks Codex: “build a debug APK and send it to my phone.”
  2. Codex runs the build, then hands the file to Nightdesk. It lands in Download › Nightdesk on his phone.
  3. He installs it under the table, opens settings, and the crash is gone.

The fix is tried on a real phone without leaving the meeting.

Without an assistant, `nightdesk-host send app.apk` in a Linux terminal, or Send to Phone… on a Mac, does the same.

A dark bedroom on a rainy night: someone sits up in bed, lit by the phone in their hands.
Nightdesk on a phone held sideways: Claude Code asks “Do you want to proceed?”, with Stop, 1, 2, 3, Mode and /compact keys below.

Answer Claude Code from your bed

2:07 a.m.Priya, backend engineer

Priya left claude refactoring the billing service on her desktop downstairs and went to bed. An hour in, it stopped to ask before running the test suite.

The whole night’s work is waiting on one key, and the keyboard is a flight of stairs away.

How

  1. She opens Nightdesk on her phone. It links to her desktop in about a second.
  2. Claude Code is the tool in front, so its keys are already above the dock: Stop, Mode, /compact and the answers 1, 2 and 3.
  3. She taps 1. The tests start, the first ones pass, and she puts the phone down.

One tap from bed, and the night’s work carries on.

Nightdesk’s agent keys for Claude Code, with Stop pressed.

Stop an agent before it edits the wrong files

3:15 p.m.Tomás, platform engineer

Between two meetings, Tomás checks on his agent and sees it opening the database migrations it was told to leave alone.

By the time he’s back at his desk, it will have rewritten them.

How

  1. He taps Stop. Nightdesk sends Esc, and Claude Code halts.
  2. Mode switches it to plan mode, and Write tells it what to do instead.

Stopped with one tap, from the corridor.

Every use case

More guides

Try it on your own computer.

The Mac and Linux apps are free. On Android, everything is on for 3 days from your first link, with no card and no account, and after that it’s $4.99 a month or $57 once (US prices; Google Play shows yours). Nightdesk for iPhone and iPad is coming to the App Store.