Ga naar inhoud

Codeeragents

Beantwoord toestemmingsverzoeken en vragen van Claude Code en Codex op je telefoon terwijl je niet achter de terminal zit. Het antwoord gaat terug naar de sessie.

pushward agent is part of the PushWard CLI and runs as a Claude Code or Codex hook. When the agent wants permission for a command or a file edit, or Claude asks you something, and you are not at the terminal, the prompt goes to your phone as an approval Live Activity. What you tap goes back to the session as if you had answered in the terminal.

ℹ Info

pushward agent comes with CLI 1.8.0 and runs on macOS and Linux. The hooks need a personal key; with an organization's key they send nothing.

Install

brew install mac-lucky/tap/pushward
pushward auth login              # your personal integration key

pushward agent install claude    # hooks in ~/.claude/settings.json
pushward agent install codex     # hooks in ~/.codex/hooks.json
pushward agent status            # the key, the desk check, which hooks are in
pushward agent test              # three sample questions on one card

Install adds its entries next to the hooks already in the file and keeps every other key and hook. It copies the old file to <file>.bak first; a .bak that is already there is left alone, so it stays the file from before your first install. The file is written back with one value per line in its own indent, so an array you kept on one line is spread out, with the same content. Running install again changes nothing, an entry you run through another command (op run, say) is left as you wrote it, and --dry-run prints the result instead of writing it.

Codex skips a new hook until you trust it, so run /hooks in Codex once after installing. Install writes only ~/.codex/hooks.json: hooks you keep in Codex's config.toml are left alone, and agent status does not see them.

What reaches your phone

Permission prompts

A shell command, a file edit or an MCP tool call shows up as a card named after the agent, Claude Code or Codex, with the command or the file in its text and your project folder as its source. It has Allow and Deny. Claude Code also gets Always when it has a rule to remember, the same one its own dialog would save, or This session when its suggestion lasts only until the session ends (accepting edits for the rest of it, after a file edit). Codex has no such button, because its hooks cannot set one.

Claude's questions

When Claude asks you several questions at once, one card steps through them, 1/3, 2/3, 3/3, with the steps of an approval card, and the answers go back as if you had picked them in the terminal. A question with three or four options draws them as numbered tiles. Older app versions show each question in turn, without the step pill; on iPhone, 1.19.1 and later still show 1/3 in the compact Dynamic Island.

Notices

When a turn finishes you get a plain notification that starts with the agent's last message, and the next one from the same session replaces it. Claude Code's background sessions (agent view) also send one when they start waiting on you. Claude's own idle reminder, a minute after a turn ends, is not passed on, so a finished turn pushes once. Notices go out only while you are away from the desk: --notices always sends them anyway and --notices off stops them.

At the desk

On a Mac the hook first checks how long the keyboard and mouse have been idle. If you used them in the last 90 seconds (--desk-idle), the prompt stays in the terminal and nothing is sent. While a prompt waits on the phone, touching the Mac ends the card and hands the prompt back to the terminal. Linux has no idle check, so there every prompt goes to the phone. --desk away or --desk desk skips the check.

When the card does not show up

If no device reports starting the card within 15 seconds, the same question also arrives as a time-sensitive notification with buttons: iOS silently drops a Live Activity start once a phone has used up its budget for them. An account with no Apple device to start the card on gets the notification as soon as the card is up. For Claude's questions the notification has an Other field for a typed answer. Whichever you answer first wins. An answer in the notification ends the card. An answer on the card takes the notification back from devices with PushWard 1.20.0 or later on iPhone, iPad and Mac, or 1.1.0 or later on Android; older versions leave it where it is. --via notification skips the card, --via card never falls back.

Waiting and timeouts

With no answer after --max-wait (25 minutes) the prompt goes back to the terminal, or is denied with --on-timeout deny. Every hook flag can also be set in the environment as PUSHWARD_AGENT_<FLAG>, for example PUSHWARD_AGENT_ON_TIMEOUT=deny, which leaves the command Codex trusted unchanged. To wait longer, install again with a longer --max-wait: the hook's timeout in the settings file has to grow with it, and install sets it a minute longer.

pushward agent install claude --max-wait 40m

Each card is a create plus one update per question, and both count against your Live Activity quota (see Limits). A card is deleted a minute after it ends, so prompts do not fill up the account's activities.

What stays in the terminal

  • A question that takes several answers. Claude Code would take the labels joined with commas, but a card answers one option per tap, so the terminal asks it, with the other questions Claude asked alongside it, and you get a notification saying a question is waiting there.
  • A plan review. Approving Claude Code's plan stays in the terminal.
  • A fourth option on Android. Android shows at most three buttons on a card, so that option can only be picked on an iPhone or a Mac, or in the terminal.

Claude Code also runs the permission hook for background subagents and for non-interactive claude -p runs, where it would otherwise deny the call on its own. While you count as away (an idle Mac, or always on Linux), those prompts go to the phone too, and the run waits for an answer up to --max-wait. To keep a script from waiting, start it with the desk check forced to the desk:

PUSHWARD_AGENT_DESK=desk claude -p "run the test suite and fix what fails"

The hook then sends nothing, and the prompt is asked in the terminal or, with nobody there to ask, denied as it would be without the hook.

What leaves your machine

The command, file path or question is sent to PushWard as the card's text, like any other Live Activity, and Live Activities are not end-to-end encrypted. The finished notice carries the first 200 characters of the agent's last message, and the notice for a question that takes several answers carries that question.

With an encryption key set in the CLI, the title and text of the fallback notifications and of the notices are encrypted, and one PushWard refuses sealed is not sent again readable. Their buttons are not: the choices of Claude's questions go out as button labels, and PushWard stores those readable either way.

The hook logs to stderr, or to a file with --log <file>, and writes only slugs, ids and statuses there, never a command, typed text, an answer URL or your key.

Use a personal key

A tap on Allow from any device the card reaches runs the command. So the hooks check the key before they send anything, and send nothing with an organization's key, whose cards go to everyone the organization's routing reaches; agent status tells you when that is the case. A key that passes is remembered for an hour in agent-key-check.json in the CLI's config directory, as a SHA-256 of the API URL and the key, so the next prompts skip the check. One that fails is checked again on the next prompt.

Every card's slug starts with agent-. A key limited to agent-* slugs (see Creating scoped keys) keeps the hooks away from your other activities. The same prefix matters for sharing: someone you share activities with by a pattern that matches agent- (a*, say) sees your prompts and can answer them.

Uninstall

pushward agent uninstall claude
pushward agent uninstall codex

Uninstall takes out only what install added and leaves your other hooks as they are.