Skip to content
moshpit

Docs · Topic

Pushes and Live Activity

Once a host is paired in Set up a host, your agents can reach your Lock Screen even when Moshpit is closed and its SSH or Mosh sockets are suspended by iOS.

When an agent stops mid-turn on a question or permission prompt, the host script waits 30 seconds before sending a push. Questions you answer while sitting at your desk clear before the timer fires and never buzz your phone.

  • Idle prompts on panes you deliberately parked at their input line do not trigger “Needs you”.
  • Multiple waiting agents on the same host collapse into one summary notification per host, chiming only on the first agent that enters the wait and updating silently as others join or leave.

When an agent completes a turn, the host sends a Finished push with how long the turn ran—and, when jq is installed on the host, the prompt that turn answered.

  • Turns that ran for 3 minutes or longer play a chime (the walked-away case).
  • Turns shorter than 3 minutes arrive silently in Notification Center.

Tapping a notification opens Moshpit and lands you directly in the pane that asked so you can read the full command or diff in the terminal before answering. Notifications carry no lock-screen Allow or Deny buttons by design.

While Moshpit has an active session with tracked agents, Status in the Dynamic Island (under Settings › Notifications) shows a Live Activity on the Lock Screen and Dynamic Island with how many agents need you, who is working, and elapsed time.

Configure alert behavior in Settings › Notifications:

  • Alert when an agent needs you: master switch for agent alerts. Turning this off also updates this phone’s pairing file on each host (NOTIFY=off) the next time it connects, stopping host-side push sends for this device.
  • Alert sound: toggle notification sound while keeping banners.
  • Show detail on lock screen: hide prompt and tool text on a locked phone until Face ID unlocks it.
  • To stop pushes from one specific server only, open Set up a host on that connection and tap Unpair.

Before a push leaves your machine, ~/.moshpit/moshpit-push.sh encrypts and authenticates the payload (host label, session, pane, agent, and prompt text) using a per-connection secret stored only in your phone’s Keychain and ~/.moshpit/push.d/<connection-id>.conf (0600). Moshpit’s stateless push relay and Apple Push Notification service carry ciphertext only and cannot read what your agent asked. For full protocol details and self-hosting notes, see Privacy and security.