ovis icon indicating copy to clipboard operation
ovis copied to clipboard

Notify only for interactive sessions, not codex exec workers

Open vibewriter-hand opened this issue 1 month ago • 2 comments

Problem

The shared policy alerts on blocked and done transitions (shared/notify-policy.ts:9-14). The web UI has no reliable launch-mode field, so a background exec worker can produce the same alert as a session that a person is using.

Proposal

Consume the core session_mode field. Gate browser alerts, web push, and in-app completion sounds on interactive modes. Keep status badges and history visible for exec workers. Treat a missing or unknown mode as not eligible for an interactive alert until the core value is known.

Acceptance

  • Interactive and orchestrated-interactive panes keep the current alert behavior.
  • exec_worker panes never create browser, push, or completion-sound alerts.
  • A mode change is handled without a duplicate alert.
  • Unit tests cover transition, reconnect, and unknown mode cases.
  • The UI explains the suppressed alert in an accessible status or settings description.

Screenshots

Add desktop notification and push test screenshots here.

vibewriter-hand avatar Oct 11 '26 02:10 vibewriter-hand

Checked on current main (86eacb05) with herdr 0.9.5, in an isolated herdr test session (herdr --session ovis-test, a fresh mktemp workspace), not a live session.

Result: this does not reproduce. A codex exec worker produces no alert today.

What I ran in that pane, sampling herdr pane get once a second:

  1. codex exec --skip-git-repo-check "Reply with the single word OK."
          1 None unknown
          3 codex unknown
          1 codex idle
         35 None unknown
    
  2. codex exec --skip-git-repo-check --sandbox workspace-write "Run the shell command: sleep 20. Then reply with the single word OK." (a ~25 s run with a tool call)
          4 codex unknown
         23 codex idle
         33 None unknown
    

herdr recognises the process as codex, but it only ever reports unknown -> idle, then the agent is gone once the run exits. It never reports working, blocked or done for an exec run.

Every alert path goes through shouldNotifyStatus (shared/notify-policy.ts), which only fires on a change to blocked or done:

  • web push: server/push.ts onStatus
  • tab notifications and the completion sound: src/lib/useAlertSignals.ts
  • the in-app droplet: src/lib/droplet.ts

So none of these fire for an exec worker. The pane's terminal also keeps running after the run, so the "terminal ended" alert does not fire either.

About the proposal: neither herdr 0.9.5's API (shared/herdr-api.generated.ts) nor herdr-core reports a session_mode field today, so there is nothing to consume yet. If herdr later reports exec runs as working/done, or adds such a field, we can gate alerts on it then. A pane that should never alert can already be muted per pane (shared muted_panes).

If you see an alert from an exec worker, please share with your herdr version and the exact command if you see an alert from an exec worker.

devswha avatar Nov 05 '26 05:11 devswha

Closing: this does not reproduce on current main with herdr 0.9.5 (evidence in the comment above). A codex exec worker is reported only as unknown -> idle and never as blocked or done, so it raises no push, notification or sound. herdr does not expose a session-mode field we could use. If you still see alerts from exec workers, please reopen with your herdr version and steps. Thanks!

devswha avatar Nov 05 '26 05:11 devswha