Skip to content

feat(hitl): add subscribe() to HitlResolverRegistry - #53

Merged
jordanauge merged 1 commit into
mainfrom
feat/hitl-registry-subscribe
Sep 4, 2026
Merged

jordanauge merged 1 commit into
mainfrom
feat/hitl-registry-subscribe

Conversation

@jordanauge

Copy link
Copy Markdown
Collaborator
  • HitlResolverRegistry.subscribe()/unsubscribe() (and the ...user_update
    counterparts) let one or more callbacks be notified the instant a HITL
    request is registered -- synchronously, inside register() itself.
  • Replaces polling get_pending_for_session() in a retry loop: that pattern
    had a real gap between "a tool call started" (an early, structural
    signal a caller might see before the request itself exists) and "the
    request actually exists" (written by the tool's own execution), so a
    consumer had to poll and hope. Subscribers now see the request the
    moment it's written, no gap to poll around.
  • Additive and never-reset -- the same pattern as ObservabilityOperator.
    subscribe() and KernelDriver.subscribe_exchange() -- so more than one
    consumer (e.g. a Webex bot and a CLI console) can each subscribe once
    and coexist, instead of one overwriting another.

- HitlResolverRegistry.subscribe()/unsubscribe() (and the ...user_update
  counterparts) let one or more callbacks be notified the instant a HITL
  request is registered -- synchronously, inside register() itself.
- Replaces polling get_pending_for_session() in a retry loop: that pattern
  had a real gap between "a tool call started" (an early, structural
  signal a caller might see before the request itself exists) and "the
  request actually exists" (written by the tool's own execution), so a
  consumer had to poll and hope. Subscribers now see the request the
  moment it's written, no gap to poll around.
- Additive and never-reset -- the same pattern as ObservabilityOperator.
  subscribe() and KernelDriver.subscribe_exchange() -- so more than one
  consumer (e.g. a Webex bot and a CLI console) can each subscribe once
  and coexist, instead of one overwriting another.

Signed-off-by: Jordan Augé <augjorda@cisco.com>
@jordanauge
jordanauge force-pushed the feat/hitl-registry-subscribe branch from 258abb7 to 6534375 Compare September 4, 2026 14:53
@jordanauge
jordanauge merged commit 0d0ab95 into main Sep 4, 2026
3 checks passed
@jordanauge
jordanauge deleted the feat/hitl-registry-subscribe branch September 4, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant