feat(kanban): "session_event" delivery mode for kanban task subscriptions - #30848
Open
loicnico96 wants to merge 11 commits into
Open
feat(kanban): "session_event" delivery mode for kanban task subscriptions#30848loicnico96 wants to merge 11 commits into
loicnico96 wants to merge 11 commits into
Conversation
loicnico96
force-pushed
the
noame/kanban-task-watchers-v1
branch
from
May 23, 2026 09:49
73e734d to
cde1b3c
Compare
loicnico96
force-pushed
the
noame/kanban-task-watchers-v1
branch
from
May 28, 2026 18:55
cde1b3c to
b7aa915
Compare
Contributor
|
Thanks for the explicit session-key design. Main now has overlapping creator wakeups from Problems
Suggested changes
This is an automated hermes-sweeper review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds an alternative delivery mode to Kanban task subscriptions, which delivers a synthetic event message to the gateway agent session (by gateway session key). This lets the agent act on Kanban events, without requiring polling or CRON-based monitoring.
Adds a parameter to kanban task creation tool and CLI to bind one such subscription immediately upon creation.
The goal is to replace polling:
Willing to update any naming / api as preferred by maintainers
Type of Change
Changes Made
Extend the existing Kanban notifications with a secondary "delivery mode".
The default mode is "notification" (send a notification to the subscribed thread/channel, user-only), matching the current behavior.
The new mode is "session_event", which sends both a notification and enqueues a new turn to the session itself. The message includes explicit wording indicating it is synthetic, and includes minimal guidance for the agent to react. The user may explain / teach their agents how to react to such messages, through skills or direct instructions. A simple example would be deciding whether to automatically unblock a worker or not; or to generate more complete / tailored summary of the progress.
I have explicitly NOT modified skills in this PR so as not to make it opinionated. It only provides the infrastructure, which users can opt-in immediately by updating skills and instructions on their side.
The synthetic events are queued so they behave as non-steering/interrupting watcher handbacks rather than new user instructions, though the gateway does not expose a true barrier between synthetic and user messages (and the PR is big enough without diving into that). The user can continue chatting normally with the agent, for example by changing the guidelines on how to react to future events.
The system is explicitly built on top of existing notification subscriptions, in order to reuse the same commands and internal infrastructure (notifier loop, event cursor, auto-unsub on completion/archival, auto-deletion on task cleanup). The primary key is unchanged, so a same channel only supports 1 delivery mode (but the mode can be switched). Any number of subscriptions of same or different modes can co-exist, although multiple agent watchers would be obviously discouraged.
How to Test
Ask an agent to create a task and watch it. Tell the agent how to react to messages. Observe the agent responding.
This works with arbitrary indirection as long as instructions are precise about forwarding the session key. You can ask the agent to call a subagent to create a task which creates multiple tasks with the correct subscriptions - it will all go back to the original channel.
Fast flow to test is: "Create a task with --watcher-session-key that waits for 20 seconds, then completes with a random integer as output. When you receive a completion event, show me the picked number in hexadecimal. Do not poll or monitor the task in any other way."
Queue semantics can be live-tested with something like: "Wait 2 minutes in 10-second intervals. Use a separate tool call for each interval, without ending the turn." The notification appears between tool calls, but the agent only takes the synthetic turn once idle again.
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs
Basic example:
Example live-steering the agent's reaction: