fix(langgraph): extract __interrupt__ from values/updates events#223
Merged
Conversation
LangGraph emits interrupts as part of `values` and `updates` events under
the special `__interrupt__` key, not as standalone `interrupt` events.
The bridge was only handling the latter, so `agent.interrupt()` /
`agent.interrupts()` never populated for real graphs and any UI gated on
those signals (e.g. <chat-interrupt-panel>) stayed hidden.
Adds an `extractInterrupts` helper called from the values/updates branches
that:
- Mirrors `__interrupt__` payloads onto `interrupt$` (latest) and
`interrupts$` (full list).
- Clears both subjects when a values/updates event arrives without an
`__interrupt__` key — LangGraph does not emit a separate "cleared"
event, so the absence is the dismissal signal once a resume completes.
Verified end-to-end against the canonical examples/chat demo: the
approval welcome suggestion now surfaces <chat-interrupt-panel>, and all
four actions (Accept / Edit / Respond / Ignore) resume the graph and
dismiss the panel correctly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
blove
added a commit
that referenced
this pull request
May 9, 2026
* feat(examples-chat-python): research subagent + tool * feat(examples-chat-angular): register research as a subagent tool * feat(examples-chat-angular): mount chat-subagents in demo shell * feat(examples-chat-angular): welcome suggestion exercising subagents * docs(examples-chat-smoke): populate Subagents checklist * docs(spec): canonical examples/chat Phase 3B subagents Splits Phase 3 of the canonical demo's roadmap into 3A (interrupts — shipped in PRs #222 + #223) and this 3B (subagents). Adds a compiled child graph (`research`) the parent dispatches as a tool, surfaces `<chat-subagents>` in the demo shell, and adds one welcome suggestion. Mirrors Phase 3A's shape: ~90 LOC, single PR, TDD'd python graph + Angular shell wiring + welcome suggestion + CHECKLIST + verification. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(plan): canonical examples/chat Phase 3B subagents plan Single-subagent-dispatch plan for Phase 3B. ~90 LOC across 7 phased tasks (Phases 0-6). TDD'd python graph (research subgraph + tool), Angular adapter config (subagentToolNames), shell wiring (chat-subagents mount), welcome suggestion, CHECKLIST, server-side verification probe, and PR open. Mirrors the Phase 3A plan format committed at daf31f89. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
LangGraph emits interrupts as part of `values` and `updates` events under the special `interrupt` key, not as standalone `interrupt` events. The `@ngaf/langgraph` bridge was only handling the latter, so `agent.interrupt()` / `agent.interrupts()` never populated for real graphs — any UI gated on those signals (e.g. ``) stayed hidden.
Adds an `extractInterrupts` helper called from the values/updates branches that:
Verification
Live smoke against the canonical `examples/chat` demo (issue surfaced as Finding H during the Phase 3A re-smoke):
Test plan
🤖 Generated with Claude Code