Live Activity
Surface agent events on the iOS lock screen and Dynamic Island while a session is running.
When moshi-hook is paired and active on the host, agent events can start and update the iOS Live Activity and Dynamic Island so the latest status sits right on your lock screen — no app switch, no inbox dig. Moshi's server sends these updates through Apple's dedicated Live Activity push channel, separately from the normal notification used for banners and inbox delivery.
What you see
A running Live Activity shows:
- The active session's title and the agent it belongs to. Sessions in Rex show their session name.
- The most recent event for that session — task complete, tool running, approval needed.
- A tap target that takes you straight into the right place in Moshi.
The Dynamic Island variant keeps the same surface compact for the front of the phone.
When you answer an approval from your phone or your Mac, its Approve and Deny buttons disappear from the Live Activity right away, instead of lingering until the turn ends.
Enable
Open Settings -> Notifications in Moshi. Under While Moshi is closed:
- Live Activity — turns the lock-screen / Dynamic Island surface on.
- Live Activity Style — Detailed is the full Lock Screen card with agent details and the context bar; Compact is a denser card without the context bar.
Under When I tap an update, Open in decides where a tap on a notification, Live Activity, or inbox row takes you: Home, Inbox, Terminal / Chat View, or Smart (approvals open the inbox details, everything else opens the terminal or Chat View).
Live Activities are delivered by push, so they need notifications turned on; the switch stays off until they are. If Live Activities are turned off for Moshi in iOS Settings, the screen shows Live Activity is off for Moshi with a shortcut to turn them back on.
End-to-end encrypted hosts
On a host with end-to-end encryption on, the Live Activity is sealed before it leaves the host. Once your phone has connected to that host over SSH in Moshi and fetched its key, the Live Activity opens it on the phone and shows the real title, message, project, and model, just like an unencrypted host.
Without the key it shows only Encrypted with "Open Moshi to read it.", and no approval buttons. If the phone has the key but Moshi hasn't run since it got it, the line reads "Open Moshi once to show this here."; opening the app once fixes it.
What triggers an update
Live Activities track one session at a time. When no activity is running, the next non-ending agent event can use APNs push-to-start to create one even while Moshi is in the background. ActivityKit then gives Moshi an update token so later events update that activity in place.
A task_complete event updates the Live Activity with the completed state; it does not generate a separate iOS banner. When moshi-hook reports session_ended, the server sends the final state with an end event. That final state can remain on the lock screen for roughly ten minutes before iOS dismisses it. iOS may also reclaim an activity earlier, and you can stop it manually from the lock screen.
If an activity was dismissed, a later non-ending agent event can start a fresh one. Turning Live Activity off in Moshi unregisters push-to-start delivery so a new activity is not created remotely.
Approval and error events also trigger a visible push notification on top of the Live Activity, so they aren't lost if the screen is off. See Push notifications and webhooks for a complete request example and the difference between agent-event pushes and custom webhooks.
Host-resident integrations can override the automatic category lifecycle with liveActivity.action on POST /api/v1/hosts/:hostId/events: use upsert, end, or none. This directive controls only Live Activity delivery; normal push and eligible inbox persistence continue independently.
Demo
The Inbox section of Settings -> Notifications includes a Show Demo Data button. Tapping it seeds a short-lived demo activity (and a small set of demo inbox rows and usage) so you can see how the lock-screen surface looks without waiting for a real agent event. Remove it with Clear data -> Clear Demo Data when you're done; demo rows also clear themselves once a real agent connects.
Troubleshooting
- Live Activity never appears. Check that push notifications are enabled (Moshi shows a warning row when they aren't), that Live Activities aren't turned off for Moshi in iOS Settings, and that
moshi-hook serveis running on the host. See Hooks for setup. - Live Activity says "Encrypted". The host has end-to-end encryption on and this phone doesn't have its key yet. Connect to the host over SSH in Moshi once. See End-to-end encryption.
- Live Activity sticks after the session is done. The final
session_endedstate is intentionally allowed to linger for roughly ten minutes. Swipe the activity away if you want to dismiss it immediately. - Tapping opens the wrong place. Check Open in under When I tap an update in Settings -> Notifications, and that the underlying inbox row hasn't already been cleared.