You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(orchestration): implement human-in-the-loop interrupts and resume workflow (#296) - #332
Implements human-in-the-loop (HITL) interrupt and resume capabilities for agent orchestration. It allows pausing an agent run awaiting external human input/approval and resuming execution with the human decision.
Thanks @Uzmaa7 — the HITL interrupt design itself is excellent and exactly what #296 needs: the interrupt() helper + NodeInterrupt, run/arun returning termination_reason="interrupted" with an interrupt_payload, and resume/aresume to inject the human decision and continue — with sync + async tests. I'd love to merge that.
I can't merge this PR as it stands, though, because the diff is 94 files / +1559 / −956 and reaches far beyond the feature — it rewrites tools/build_docs.py (+526), the entire test suite, benchmarks/, examples/, the integrations/, and every chat/ file. Two problems with that:
Scope/reviewability. A HITL feature touching build_docs.py, benchmarks and examples can't be reviewed as one unit.
Could you rescope it to just the interrupt feature? Rebase onto latest development and keep only:
src/dynavec/exceptions.py — NodeInterrupt
src/dynavec/agents/base.py — interrupt()
src/dynavec/agents/react.py — the interrupt-catch + resume/aresume, re-applied on the new helper-based loop from feat(agents): add tool registry and built-in connectors #328 (_execute_loop / _process_tool_calls / _finalize_result now exist — your _execute_loop idea actually lines up well with that structure)
tests/test_hitl_interrupts.py
the README HITL section, if you want
Please drop the changes to build_docs.py, benchmarks/, examples/, integrations/, embeddings/, quantization.py, and the unrelated test files (likely an editor/formatter sweep that pulled in older versions). A focused ~4–5 file PR will sail through review + CI and I'll merge it quickly. Happy to help if the rebase onto the refactored loop is fiddly. 🙏
This branch has not been deployed
No deployments
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
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.
Description
Implements human-in-the-loop (HITL) interrupt and resume capabilities for agent orchestration. It allows pausing an agent run awaiting external human input/approval and resuming execution with the human decision.
Related issue
Fixes #296
Changes
interrupt()primitive to pause execution and record step state.resume()andaresume()APIs on agents to inject human input and continue execution.Testing
pytest tests/test_hitl_interrupts.py— 3 passed, full suitepytest— 820 passed)Checklist