Docs · Topic
Set up a host
Set up a host connects your coding agents’ lifecycle hooks to Moshpit so your phone sees each agent’s state and receives encrypted pushes when an agent needs you or finishes a turn.
Run host setup
Section titled “Run host setup”Moshpit never changes anything on a host silently. It asks before its first install when you connect, and you can inspect, test, repair, or remove the setup at any time:
- Connect to the host in Moshpit.
- Open Settings › Set up a host and tap the connected host.
- Under Agent status, select an agent and tap Install (or Update / Reinstall). Tap the test row below it inside an open tmux pane to verify the script runs.
- Under Push, tap Pair (or Re-pair), then tap Send a test notification while keeping Moshpit open on screen to confirm round-trip delivery.
Pushes require openssl and curl on the host. Installing jq is optional and lets finished notifications include the prompt the agent answered.
What gets written on the host
Section titled “What gets written on the host”All Moshpit files live under ~/.moshpit, and only the agents found on that host get hook entries unless you explicitly confirm installing for another agent:
| Path | Purpose |
|---|---|
~/.moshpit/moshpit-stamp.sh |
Invoked by agent hooks; stamps @moshpit_* options on the tmux pane and triggers pushes for “needs you” and “finished”. |
~/.moshpit/moshpit-push.sh |
Encrypts the status on the host and sends ciphertext to the push relay. |
~/.moshpit/manifest.json |
SHA-256 digests of installed files so Moshpit can tell when scripts are out of date. |
~/.moshpit/push.d/<connection-id>.conf |
This phone’s 256-bit pairing secret and send token, written with mode 0600. |
<config>.moshpit.orig |
One-time backup saved before Moshpit first edits an agent config file. |
Depending on which agents exist on the host, Moshpit merges hook entries into ~/.claude/settings.json, ~/.codex/config.toml, ~/.gemini/settings.json, ~/.qwen/settings.json, ~/.qoder/settings.json, ~/.factory/settings.json (or ~/.factory/hooks.json), and ~/.codebuddy/settings.json. Existing settings in those files are preserved.
Trust hooks in Codex
Section titled “Trust hooks in Codex”Codex will not execute newly added hooks until you approve them on the host:
- Start
codexin a shell on your host. - Run
/hooks. - Mark the four Moshpit entries as trusted.
Until you complete this step, Codex will not report state on tmux or send pushes.
Undo or remove
Section titled “Undo or remove”Open Settings › Set up a host while connected to the host:
- One agent only: pick the agent under Agent status and tap Remove.
- Pushes on this phone: tap Unpair under Push to delete this phone’s pairing file and stop pushes from that host.
- Everything: tap Remove Moshpit from this host and confirm. Moshpit strips its hook entries from every agent config (leaving the rest of each config untouched), removes this phone’s pairing, and deletes
~/.moshpitif no other phone is still paired with the host.