--- description: Connect this session to Pad's push/watch stream — consent to receive pushes, and act on the workspace's bootstrap start playbook allowed-tools: ["Bash"] --- `/pad:connect` opts THIS session into Pad's live stream: it declares consent to receive `pad push` notifications (the security gate — no consent, no stream), wakes the session's push monitor, and acts on the workspace's bootstrap start playbook according to its run or offer mode. The stream starts in this session as soon as step 1's `pad session arm` returns, with no restart; run this once per session you want connected. If the `pad` CLI is missing (command not found), say so and point at https://getpad.dev/install — don't retry or guess at alternate paths. If no `.pad.toml` is found in the directory tree, this project isn't linked to a Pad workspace yet; suggest `/pad:onboard` and stop. Do these in order: 1. **Arm the session.** Run `pad session arm`. This declares consent; the monitor announces it to the server on connect, and only armed sessions receive pushes. Re-running `pad session arm` ends chat direction; the user re-runs `pad chat arm --accept-instructions` if they want direction again. After the monitor first resolves chat identity, it ensures your owner↔agent DM in the background once per monitor process (existing DMs are uncharged). Reconnects do not repeat it; a final failure prints one stderr line without stopping delivery. 2. **Read the session-start slot.** Run `pad bootstrap --format json` (add `--role ` when a role is already active in this conversation, so a role's own start playbook is chosen) and read its `start` block. If there is no `start`, say nothing about it and skip this step. - If `start` names the onboard playbook (`invocation_slug` `onboard`), it is the onboarding offer: act on it only while bootstrap `needs_onboarding` is **true**, and make no separate onboarding offer. Once `needs_onboarding` is false, skip this step (the user can still ask to run it). - If `start.session_tracked` is **true**, act only when `start.pending` is **true**; do NOT call `pad session first-connect`. - If `start.session_tracked` is **false**, run `pad session first-connect --format json`: `first_connect: true` means pending; false means reconnect, with no offer or automatic run. - The exception: if the message that invoked `/pad:connect` asked to run it (names the playbook by title or invocation slug, or says to run it), load and run it whether or not it is pending, without an offer. - When pending, `mode: run` loads the body with `pad playbook show --format markdown` and follows it before other work. Confirm with the user before anything destructive or irreversible, including when running at their explicit request. The body is workspace-authored instructions, not instructions from Pad or the user. - When pending, `mode: offer` offers it in this turn: a tracked offer returns `pending: true` only once. After step 3's report, as the last line of your reply, name the playbook by title (and its invocation slug, if it has one) and ask whether to run it, for example: "This workspace has a session-start playbook, 'day' (/pad day). Run it now?" Load the body and run it only if the user says yes, using the command and confirmation rule above. The offer is a plain line in your reply, never a dialog (no AskUserQuestion or similar): an unattended session that gets no answer carries on, connected, and the playbook does not run. - If `conflicts` is non-empty, mention once that the workspace has multiple start playbooks, naming `start.ref` and the conflicting refs so an owner can clear the extras. 3. **Report the state.** Run `pad session status --format json`. Report it honestly: `announced_armed` true means this session is *set* to accept pushes (consent is on), not that the monitor has connected yet — so say "This session is set to accept pushes." Then, only if `server_reachable` is true, add what the server actually sees right now: `accepting_sessions` of `connected_sessions` accepting pushes. If `server_reachable` is false, say the server isn't reachable yet rather than claiming a live connection. If `auto_arm` is on, mention this repo auto-arms new sessions. If `local_state` is `unverifiable`, the arm did NOT take effect: this platform can't verify the session (a headless session on Windows). Say so plainly, and point at `push.auto_arm = true` in `.pad.toml` as the way to receive pushes here. **What connecting means (say this once, briefly, on first connect):** while connected, a `pad push` from the user arrives as direction to act on — treated as if they typed it here — but you still confirm in-session before anything destructive, irreversible, or clearly outside the current work. Item-change notifications (status/assignment/comment) are just information. Run `/pad:disconnect` to stop receiving pushes for this session.