Skip to content

Coding-agent subagents B8: notifications for paused and finished subagents #394

Done

Description

@pdettori

Part of the Coding-agent subagents epic (#378). Item B8, milestone B-M2. Depends on B6 (#392) and B7 (#393).

Goal

When a subagent stops for approval, fails or finishes while the owner is away, the owner hears about it on their phone and can act from there.

Current state

  • Nothing notices a paused or finished turn.

Scope

  1. A control-plane notification sink that consumes Coding-agent subagents B6: owner-scoped event stream of session and turn state #392's events: a signed webhook, plus one push adapter. ntfy is the proposal: it's self-hostable, which fits MOCA's positioning. Slack is an alternative.
  2. Triggers: paused (with the gate summary), failed, and terminal states (configurable).
  3. Per-subject configuration, and rate limits.
  4. The deep link opens an approval that requires login (the Coding-agent subagents B7: gates v2 — gates on prompt/solve leaves, decision API, deadlines #393 decision API), never a bearer token in a URL.

Acceptance

  • A gate on a subagent reaches a phone within 30 s.
  • Approving through the link, after login, resumes it.
  • Webhook signatures are verified in the tests.

Working conventions (for a fresh session)

  • Workspace: git fetch, then create a worktree from rossoctl/main (never local main), under .worktrees/. Populate and build pi-fork (git submodule update --init --recursive && cd pi-fork && npm ci && npm run build), then pnpm install. A worktree without the pi-fork build does not typecheck.
  • Plans: write the plan with superpowers:writing-plans into docs/plans/<date>-<slug>.md. Plans are gitignored and never committed. Write it in chunks, one append per task.
  • Pre-flight table: list every process entrypoint, systemd unit, env example and shell/Go launcher whose boot contract changes, not only TypeScript call sites.
  • Tests: Redis on 6379 must be up. Use each package's own node_modules/.bin/vitest. vitest can exit non-zero with every test green, so grep the log for Errors. Redirect long output to /tmp/kagenti/.... make lint skips untracked files.
  • Commits: git commit -s with Assisted-By: Claude (Anthropic AI) <[email protected]>, never Co-Authored-By.
  • Shared KVM rig: alert the owner before using it, record a manifest of what you install, and verify cleanup.
  • Don't push or open PRs without the owner's go-ahead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions