Skip to content

fix(kanban): add agent-only notification delivery - #84191

Closed
MaximCrabbe wants to merge 1 commit into
NousResearch:mainfrom
MaximCrabbe:fix/discord-kanban-agent-only
Closed

fix(kanban): add agent-only notification delivery#84191
MaximCrabbe wants to merge 1 commit into
NousResearch:mainfrom
MaximCrabbe:fix/discord-kanban-agent-only

Conversation

@MaximCrabbe

Copy link
Copy Markdown
Contributor

Summary

  • add kanban.notification_delivery_mode with backwards-compatible text_and_agent and new agent_only
  • make the originating LLM wake the durable delivery in agent_only, without native Kanban text/artifacts
  • rewind and retry failed wakes before advancing the subscription cursor
  • preserve Discord group/thread/profile routing and existing non-push API-server behavior

Why

Push adapters currently couple native Kanban terminal messages to the LLM wake. Disabling native Discord notifications therefore also removes the completion wake, so an asynchronously completed task can silently lose its user-facing result.

Tests

  • focused notifier/config suite: 104 passed
  • broad gateway + hermes_cli suite: 10,027 passed, 64 skipped, 0 failed
  • delivery-mode regression suite after final commit: 15 passed
  • Ruff, py_compile, and git diff --check: passed

Compatibility

The default remains text_and_agent; invalid values fail safely to that existing behavior.

@alt-glitch alt-glitch added type/bug Something isn't working comp/gateway Gateway runner, session dispatch, delivery comp/cli CLI entry point, hermes_cli/, setup wizard comp/cron Cron scheduler and job management area/config Config system, migrations, profiles P3 Low — cosmetic, nice to have sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades labels Aug 12, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Closing as superseded by #85487 (salvage of #37865), which landed per-subscription delivery_mode — a subscription with delivery_mode='wake' is exactly your agent_only: the text ping and artifacts are skipped and the wake is the delivery. The reason this closes rather than merges isn't timing: per-subscription granularity strictly dominates a process-global config knob (one board can mix woken orchestrator lanes with plain text-ping observers), and two knobs for one behavior would conflict.

One piece of your PR survives as a real gap on main: for a push-adapter sub in wake-only mode, the wake is the sole delivery yet the cursor still advances BEFORE the best-effort wake — a failed wake permanently loses the event. Your delivery-before-advance ordering (with rewind/retry) is the right fix, and we're extracting it as a follow-up PR with credit to you for identifying it. Thanks — the ordering insight was the sharpest part of this PR.

@teknium1 teknium1 closed this Aug 13, 2026
teknium1 added a commit that referenced this pull request Aug 13, 2026
…h rewind/retry

For a push-adapter subscription with delivery_mode='wake' the visible text
ping is intentionally skipped (the send_passive gate), so the wake injection
IS the sole delivery — yet the event cursor advanced BEFORE the wake, which
then ran best-effort with its failure swallowed. A single failed wake
permanently lost the event.

Apply the same ordering the non-push (api_server) self-post branch already
uses: attempt the wake BEFORE advancing the cursor; on failure rewind the
claim (_kanban_rewind) and bump the per-sub failure counter so the next tick
retries; on success reset the counter; drop the subscription after
MAX_SEND_FAILURES consecutive failures like text sends do. notify+wake mode
is unchanged: the text ping is the delivery and the wake stays best-effort
after the cursor advance.

Extracts the residual delivery-ordering insight from closed PR #84191.

Co-authored-by: MaximCrabbe <crabbemaxim@gmail.com>
@teknium1

Copy link
Copy Markdown
Contributor

The residual ordering fix promised in the close comment above has landed: PR #85556 (commit f57116b) runs wake-only delivery BEFORE cursor advance on push adapters with rewind/retry, so a failed wake can no longer lose the event. You are credited via Co-authored-by on the commit. Thanks again for spotting the gap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles comp/cli CLI entry point, hermes_cli/, setup wizard comp/cron Cron scheduler and job management comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants