While Redde runs, it posts its own notifications: a reply finished, a command waits for approval, the agent has a question, a turn failed. iOS closes an app in the background after seconds to minutes, and from then on Redde can say nothing. This is how a person's own Hermes says it instead, without anyone in between being able to read it.
It is off until someone pairs a Hermes, and nothing described here happens before that.
Hermes (yours) relay (Goosehouse) Apple iPhone
redde-push plugin ── sealed ──▶ /v1/devices/…/push ──────▶ APNs ─────────▶ EchoPush extension
has the key has the push address has the key
- The plugin (
companion/hermes-plugin/redde-push) runs inside Hermes. Its hooks fire when a reply finishes, when the agent waits on a person and when a turn fails (how it knows each is below). It writes a short note (kind, session id, conversation title, the reply's first 500 characters or the command or the question), seals it with AES-256-GCM under a key it shares with one phone, and posts the result to the relay. - The relay (
companion/push-relay, the/v1routes) is a Cloudflare Worker. It holds, for each pairing, the phone's APNs token, the SHA-256 of a secret, and when the phone last checked in. A post that carries the secret is forwarded to Apple as a notification whose visible text is always "Open Redde to see what's new" and whose payload is the sealed note. It has no key and keeps nothing of what passes. - Apple delivers it. It sees what the relay sees.
- The notification extension (
EchoPush) runs on the phone when the notification arrives, opens the note with the key from the Keychain and replaces the text. A note it can't open is shown as it came. If the app is in front it does the same itself (Notifier.presentUnopened), which also covers the simulator, where a simulated push skips extensions.
The key is agreed between the plugin and the phone; the relay only carries the two halves.
- On the Hermes machine:
hermes redde-push pair. The plugin makes an X25519 key pair and shows its public key as a link,https://redde.goosehouse.org/connect#push=<key>, and as a QR code of that link. The key sits after the#, which a browser never sends; with Redde installed, iOS opens the link in the app without loading the page. - In Redde: Settings › Voice › Notify when Redde is closed › Pair with a code › scan it (or paste the link, or open it). The app asks before doing anything. Then it asks iOS for a push token, makes its own key pair, registers the token at the relay under a fresh random secret (the relay is sent the secret's hash), and leaves its answer at the relay: its public key, and its relay id and secret sealed for the plugin.
- The plugin, polling, takes the answer. Both sides now derive the same 64 bytes with
HKDF-SHA256 from the X25519 shared secret (salt: the two public keys; info:
redde-push v1): 32 for notes, 32 for the answer's box. The plugin opens the box, stores the phone, and sends a first note. When that note opens on the phone, the pairing is confirmed.
The answer waits at the relay in a slot named by a hash of the plugin's public key, written once by a registered phone, read once, gone after ten minutes. What makes the pairing trustworthy is where the link was read: the person's own terminal. Someone who could replace the QR code there could pair their own phone; the relay could not, since it never sees a private key.
An app that is signed in to that Hermes's Dashboard needs no code, and from Hermes 0.21.5 no
terminal at all: the same screen has Hermes install the plugin ("Install the Plugin", which asks
the Dashboard to fetch this repository's plugin folder from GitHub and switch it on, the way its
own Plugins page would), and that Hermes loads it at once. On 0.21.0 and 0.21.3 the install works
the same but Hermes loads a new plugin only when it starts, so the gateway and the Dashboard
have to be restarted on that machine first. Then "Pair with " does the same key agreement
over the connection the app already has (PushService.pairDirectly):
- The app asks the plugin for an offer:
command.dispatch redde-push "offer". The plugin makes a key pair, keeps it in memory for ten minutes at most, and answersredde-push offer <public key> <the relay it uses>. - The app registers its push token at the relay, as before, and hands its answer straight back:
command.dispatch redde-push "accept <offered key> <its public key> <the box>". - The plugin opens the box, stores the phone, answers
redde-push paired <machine name>, and sends its first note. An offer is answered once.
The relay carries neither half this way; it only learns the phone's push address. The two halves
cross on the Dashboard connection, which already carries every conversation: whoever could
tamper with it could read those too. The plugin's "paired" means it opened the box, so it holds
the key, and the app counts the pairing from then (PushPairing.accepted), before any note has
arrived; if none does within forty seconds, the app says the Hermes may not be able to reach the
relay. Over the Hermes API there is no such channel, and the code is how to pair. A plugin from
before this answers "offer" with its usage line, which the app reads as "update the plugin".
- Over the Hermes API, every turn notifies every paired phone: on a Hermes with the app paired, the API's client is the app.
- Over the Dashboard, a conversation notifies a phone once that phone has taken part in it.
The app says so with a plugin command at the start of a turn
(
command.dispatch redde-push "watch <session> <device ids>"), once per conversation per launch. A turn typed at the terminal or in Hermes Desktop stays quiet. hermes redde-push notify allmakes every conversation on that Hermes notify.- Group chats (Hermes's hosted rooms) notify the phones following them: the app sends the
list it shows, less the muted ones, whenever it reads it (
command.dispatch redde-push "rooms <device ids> <room ids>",PushService.followRooms), and the plugin follows exactly those. Hermes Desktop's rooms are kept by the Desktop app, not the server, and don't. - Muted chats don't notify that phone: the app sends all of what it has muted whenever that
changes (
command.dispatch redde-push "mutes <device ids> <key=until,...>", keyss:<session>andg:<room>, until in seconds since 1970, 0 for until it says otherwise;Store.set_mutes,mutes.json), andtargetsand the room notes leave it out while a mute holds. A note that comes anyway is delivered quietly by the phone (MutedChats).
Approvals notify when a person is asked (pre_approval_request with a surface other than
smart). Over the Hermes API a stock Hermes doesn't hold a command for a person at all; the agent
is told it needs approval and says so in its reply.
Group chats (rooms.py, 2026-10-20). No release has a hook for a bot's message in a room:
0.21.3's on_room_member_activity streams a turn's frames (deltas, tools, the approval's
request.opened), not the message the room keeps, and every hook in a bot's turn fires in the
plugin manager of the bot's own profile, which may not have the plugin. So a thread of the
plugin's reads each followed room's log every four seconds (gateway.hosted_rooms.read_events on
default_db_path(): state.db on 0.21.0, shared-state.db from 0.21.3), in whichever process
has the main profile's plugin loaded: the Dashboard's once the app has sent rooms, the
gateway's once it has run a turn; a load with rooms followed starts it. How far each room has
been read is on disk under an flock, taken without waiting, so processes reading at once send
each message.member once; a room first seen starts at its latest event. A pass is never in the
log. What a bot waits on (an approval, a turn to retry) is in the memory of the process running
the room, tui_gateway.methods_groups._service.status(room)["pending_actions"], read only where
it is already loaded; that is the Dashboard's, which is where groups.state and so the app's
cards come from, so what is announced is what the app can answer. Each is announced once
(room-waits.json) until it is gone. The bots' own turns in a room run on platform bot_room:
the reply, approval and failure hooks leave those to the room. lab.sh grouppush checks all of it
on 0.21.0, 0.21.3, 0.21.5 and 0.22.2.
Hermes has a plugin hook for two of these, a finished reply and an approval. The rest are read
from what it does tell a plugin. All of it was measured on unmodified Hermes 0.21.0, 0.21.3 and
0.21.5, with a plugin that wrote down every hook (scripts/hermes-lab runs the result on each).
| What | How the plugin knows | Where |
|---|---|---|
| A reply finished | post_llm_call |
everywhere |
| A command waits for approval | pre_approval_request |
Dashboard |
| The agent asks a question | post_api_request: the model's answer calls the clarify tool |
Dashboard (the tool isn't offered over the Hermes API) |
| A command waits for the sudo password, a skill for a secret | the Dashboard's own list of what it waits on, read while tools run | Dashboard, Hermes 0.21.3 and later |
| A turn ended without a reply | api_request_error, then nothing more from that turn |
everywhere |
| A handed-off task came back | subagent_stop between turns, then the reply of the turn Hermes starts for it |
everywhere |
A question. post_api_request hands every plugin the model's answer after each request. A
call to clarify in it means the question is put to the person next (core.question reads it;
a call Hermes will turn down, with nothing asked, announces nothing). pre_tool_call would say the
same a moment later, but Hermes 0.21.0 and 0.21.3 refuse a tool when a plugin's pre_tool_call
callback is still busy with another call (two subagents calling tools at once is enough), and no
notification is worth a refused tool; 0.21.5 fixed that. post_api_request only ever skips.
A sudo password, a secret. These are asked through callbacks inside the terminal and skill
tools, with no hook before or after. From 0.21.3 the Dashboard keeps a list of the questions it has
put to a client and not had answered (tui_gateway.server_requests), the one a reconnecting client
is handed as open_requests. While a followed conversation runs tools (from an answer that calls
any, until the next request to the model), the plugin looks at that list twice a second and
announces a sudo or secret request it finds for that conversation, once (core.Waiting,
_peek). It is announced when it is really being asked: a cached password or a rule in sudoers
means no prompt and no note. This reads Hermes's own state, which no interface promises; a
release that moves it stops these two notes and nothing else, and lab.sh push says so. On 0.21.0
there is no list, and no note.
A turn that failed. When a request to the model fails, api_request_error fires, each time.
When Hermes then gives up, nothing fires: not post_llm_call, not on_session_end (the turn
leaves by another door than the one those hooks are on). So a failed request starts a wait, the
next thing the turn does calls it off (pre_api_request, post_api_request, a reply, a stop),
and a wait that runs out is a failed turn (core.Turns). The waits come from what Hermes may
still be doing: 20 seconds after an error it doesn't retry; 150 after one it does, since 0.21.5
parks a turn up to 72 seconds at a time between rounds of retries, and up to 120 when the
provider names a wait (measured: a provider that stays down is given up on after five minutes);
660 after a rate limit, which Hermes waits out for up to ten minutes. The note carries the
provider's own words (core.failure). A turn that goes on after all sends its reply, which
replaces the note (same collapse id). A person who stops the turn calls the wait off
(agent_loop_stopped, 0.21.3 and later; 0.21.0 has no such hook, so there a turn stopped in the
seconds it was retrying is announced as failed). A turn Hermes itself calls failed (on_session_end with failed) has
usually said a few words about it, which went out as its reply; if it said none, it is announced.
A task that came back. A task handed to a subagent runs in the background; when it finishes,
subagent_stop fires between the conversation's turns. Over the Dashboard, and over the Hermes
API on 0.21.0, Hermes then starts a turn there by itself, and that turn's reply is what the agent
makes of the result: it is sent as a task note in place of a reply. Over the Hermes API from
0.21.3 no turn follows, so twenty seconds on the plugin sends the task's own summary. A subagent's
own replies and failures are not a person's business and send nothing.
Listening to the request hooks has a price: Hermes prepares a trimmed copy of each request for
whoever listens, 3 to 6 ms per request to the model on requests of 150 KB to 2 MB (measured on
0.21.5). The plugin's own part of every hook is a few dictionary lookups; notes are built and sent
from a thread of its own. A Hermes that exits while a failure is still being waited on says so on
its way out (_leave), since a restart is what often follows a provider going down.
On the phone a failed note can repeat what the app has shown: an app still running when the
turn failed said so then, and the plugin's note comes minutes later. The app writes down the
sessions whose failure it has shown (ToldAlready, in the app group), and the extension lets a
note about one of them in without sound or banner, in place of the app's own.
A Dashboard turn that stops for an approval waits for it with nobody connected, five minutes by
default (approvals.timeout). There are two ways back to it.
Approve and Deny on the notification. An approval note for a conversation the phone follows
(so a Dashboard one) carries h, sixteen hex digits of the SHA-256 of the command. The buttons start the app in the background
(after an unlock: it may have to sign in). It resumes the session, which tells it what the session
is waiting on, and answers only if that is still the command the notification showed
(HermesServeClient.answerWaitingApproval). Otherwise, or if the Dashboard can't be reached, a
second notification says the approval wasn't answered; silence would read as done. A note for a
conversation no phone follows has no h and no buttons: the Dashboard has no hand in a turn over
the Hermes API or at a terminal.
An answer on a question's notification. A question note in a conversation the phone follows,
on a Hermes that lists what it waits on (0.21.3 and later), carries h too, of the question's
text, and c, its choices. The notification has a Reply field, and the choices as buttons. An
answer starts the app in the background, as for an approval: it resumes the session and answers
only if the session is still waiting on that one question (HermesServeClient.answerWaitingQuestion),
and says so in a second notification if it couldn't. Several questions asked at once, or one
where several choices may be ticked, have no h: those take the card.
The buttons need a notification category, categories are registered ahead of time, and a
question's choices are only known when it arrives. So the app registers one with the Reply field
alone (PushNote.questionCategory), and the notification extension adds one for the question at
hand as its note comes in (PushNote.choiceCategory, NotificationService.registered): the
app's categories plus this one, then asks for the list again before letting the notification
through, since the answer only comes back once the new set is in place. If the app's own
category isn't in the list it reads, or the new one doesn't show up in it, the note keeps the
app's category and its Reply field. The app sets its categories afresh at launch, which drops the
extension's; a question's notification still on screen then keeps its text and opens the
conversation, without its buttons.
The card, on opening the conversation. Opening a Dashboard conversation, from the notification
or the list, resumes its session; if a turn is under way there, the app joins it
(HermesServeTransport.rejoin, Conversation.rejoinIfWaiting): the reply so far, what follows,
and the card for whatever the agent is waiting on: an approval, a question, the sudo password or
a secret (the last three on Hermes 0.21.3 and later, which list them). Opened from the Home Screen instead, the app
shows the conversation it was closed in, whose question was saved when it was sent; a
conversation that ends on an unanswered question is fetched again and joined the same way
(Conversation.catchUp). Leaving a conversation whose turn was only joined leaves the turn
running; Stop stops it.
How the host says what is waiting depends on the release. 0.21.3 and later list it under
open_requests, answered by a response frame; 0.21.0 gives pending_approval, answered by
approval.respond. And 0.21.0 has a rule of its own: the Dashboard stops a turn twenty seconds
after its last client disconnects (dashboard.ws_orphan_reap_grace_s, where 0 means never), so
there a turn seldom outlives the app at all. 0.21.3 and later let it run.
Twice the same thing: while the app is still alive in the background it posts its own banner,
and the pushed one for the same event is removed (Notifier.sweepRelayDuplicates).
| Where | What |
|---|---|
Hermes, $HERMES_HOME/redde-push/devices.json (mode 600) |
per phone: relay id, relay secret, the note key, a name |
Hermes, …/watch.json |
which sessions each phone follows (the last 500) |
| Relay (KV) | per pairing: APNs token, SHA-256 of the relay secret, sandbox or production, last check-in. Forgotten after 120 days without one, or when Apple says the token is dead |
| iPhone Keychain (app group, this device only, readable after first unlock) | per pairing: relay id, relay secret, the note key, the machine's name |
Removing a pairing in the app deletes it from the phone and the relay; the plugin learns from its
next note, which the relay turns away with 410, and forgets the phone. hermes redde-push remove
does it from the other end.
Pairing link: …/connect#push=<base64url X25519 public key>[&relay=<url>], or
redde://connect?push=…. The relay rides along only when it isn't the usual one, and the app
refuses a link for a relay it isn't set to.
Answer, at PUT /v1/pairings/<rid> where rid is the first 32 hex digits of
SHA-256("redde-push rendezvous v1" ‖ offered key):
{"pub": "<base64url X25519 public key>", "box": "<base64url nonce ‖ ciphertext ‖ tag>"}The box is AES-256-GCM under the box key, additional data redde-push pairing, around
{"id": "<relay id>", "send": "<relay secret>", "name": "<device name>"}.
Note, the payload of POST /v1/devices/<id>/push and the e of the notification: standard
base64 of key id (4 bytes) ‖ nonce (12) ‖ ciphertext ‖ tag (16). The key id is the first four
bytes of SHA-256("redde-push key id" ‖ note key); the additional data is the relay id, so a note
opens only for the pairing it was sealed to. Inside:
{"v": 1, "k": "reply", "s": "<session id>", "t": "<title>", "b": "<text>", "d": "<detail>", "n": "<machine>", "at": 1791330000}k is reply, task, approval, question, sudo, secret, failed, paired, test,
widget, group or group_wait; what b and d hold for each is listed at core.note and
core.room_note; routine (plugin 1.5.0, core.routine_note) says one of a bot's schedules
ran: p the bot's profile, d its name, t the schedule's, b what it came up with (w
"failed" when it didn't finish), from routines.py, which reads every profile's cron store each
half minute. The group chat's two (plugin 1.4.0) have no s: g is the room, t its name,
d the bot; group has the message in b; group_wait has w, "approval" (b the command,
r why, h its digest, which the app answers by, finding that command in groups.state) or
"retry" (x the task for groups.retry). Each has a collapse id of its own. A kind the app doesn't know
leaves the relay's words in place. widget (plugin 1.3.0, core.widget_note) is not about a
turn: it is what the agent wrote for its widget on the phone while no phone was following the
conversation, with t the heading, b the lines, and f and u from and until when, as the
agent wrote them (the phone reads them in its own time zone). It is sent only once the phone
has turned the widget's phone tool on, which no app before it can do, kept by Apple for half a
day instead of an hour, and shown on the phone as a notification without sound that says what
was written. An approval that can be answered from the notification also has h, the first
sixteen hex digits of SHA-256(command); a question that can has h of its text, and c, a list of up to four choices. The plugin also sends an apns-collapse-id, a hash over the key, the kind and the
session, so a later note about the same thing replaces the earlier one; the relay learns only that
two notes belong together. reply, task and failed count as one kind for this: however a turn
ended, the latest word on it stands.
Whether a notification makes a sound is the phone's choice (Settings › Voice › Notification sound): the relay asks Apple for the default sound every time, and the extension takes it off.
node --test companion/push-relay/test/relay.test.mjs
python -m unittest discover -s companion/hermes-plugin/tests # needs `cryptography`
scripts/hermes-lab/lab.sh push # the plugin inside Hermes 0.21.0, 0.21.3 and 0.21.5
scripts/hermes-lab/lab.sh push --app # and the app in a simulator pairing with each
EchoTests/PushTests.swift checks the app against values the plugin's code produced, so the two
ends can't drift apart unnoticed. The lab runs the relay's own code under Node with a stand-in for
Apple. lab.sh push also pairs a stand-in phone over the Dashboard, and --app does it with the app's
own client and push service (EchoTests/HermesLabPushTests). lab.sh push makes the stand-in model ask a question, run sudo,
open a skill that wants a secret, hand off a task and fail, and reads the note for each
(LAB_PUSH_SLOW=1 adds the turn that is retried for minutes before it fails). scripts/hermes-lab/lab.sh approvals covers answering: the app's own Dashboard client joins a turn
left waiting and answers its card, for an approval, a question, a password and a secret, and
answers an approval by session and digest the way the notification's buttons do, on each release. Two things no simulator shows: the extension opening a note while
the app is closed, and a tap on the notification's own buttons. Both take a real notification
from Apple, so a phone and the deployed relay.
- The relay is deployed with these routes (2026-10-07), at the address in
PushService.defaultRelayandcore.DEFAULT_RELAY,https://redde-push.goosehouse.org. Seecompanion/push-relay/README.md. - The privacy policy says what the relay holds (
docs/privacy.md, "Notifications when Redde is closed"). Still to do by hand: the policy published where the App Store links to it. The App Privacy answer stays "Data Not Collected" (docs/app-store-listing.md, "App Privacy"). - Export compliance. The app encrypts and decrypts with CryptoKit (AES-GCM, X25519, HKDF)
beyond HTTPS.
ITSAppUsesNonExemptEncryptionstaysfalse, since all of it is the operating system's own; the reasoning is indocs/app-store-listing.md, "Export compliance". - A new bundle id,
com.goosehouse.echo.push, for the extension: an App ID with the app group, which Xcode's automatic signing creates on the first archive. - On a phone: pair with a real Hermes; lock the phone and close the app; a reply and an approval each arrive with their text; tapping one opens its conversation, the approval's with its card; Approve and Deny on the approval answer it; Reply on a reply's banner sends into it. The same for a question (its card comes back; Reply and its choice buttons answer it), and for a turn that fails with the app closed. With Notification sound off, a pushed note arrives silent. And a turn that fails while the app is still running in the background alerts once, not again when the plugin's note follows.
- A password or a secret can't be given from the notification, only by opening the conversation; nor can several questions asked at once. On Hermes 0.21.0 no question can, and the cards don't come back on opening the conversation either.
- Kanban tasks and cron jobs announce nothing of their own: the plugin doesn't listen for Kanban's hooks (they fire in each worker's own process), and Hermes has none for cron.
- Hermes's other prompts have no note: unlocking a password manager, an MCP server's setup.
- A provider that names a wait longer than two and a half minutes for an error other than a rate limit gets the turn called failed while Hermes is still waiting; the reply, when it comes, replaces that.
- A note the extension couldn't open (the phone not yet unlocked since a restart) stays as the relay's words; the app doesn't go back and open it.
- A tapped notification opens its conversation on the server the app is on. One from another of the app's servers leaves the app where it was.