Add parentRunId to resume runs for AG-UI protocol conformance#1
Closed
Copilot wants to merge 2 commits into
Closed
Add parentRunId to resume runs for AG-UI protocol conformance#1Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
- AGUIEventEmitter: accept parent_run_id in constructor, pass to RunStartedEvent - agent.run_agui(): accept parent_run_id param, pass to emitter - agent._pending_interrupt: store run_id for resume parentRunId tracking - agent_service._run_round_stream(): accept parent_run_id, pass to run_agui() - agent_service.resume_agui(): extract interrupted run_id, pass as parent_run_id - agent_service._load_persisted_interrupt(): return round_id for cold recovery - collect_agui_events helper: support parent_run_id parameter - Add 4 new AG-UI protocol conformance tests Agent-Logs-Url: https://github.com/RonaldJEN/OpenCapyBox/sessions/8a4cadd0-bbbc-4521-b127-49b8fa9cafbe Co-authored-by: RonaldJEN <36885328+RonaldJEN@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Verify Askuser implementation against Agui protocol design
Add parentRunId to resume runs for AG-UI protocol conformance
Apr 5, 2026
Owner
|
@copilot 用中文summary下本次修改 |
Author
本次修改的核心目标是让 问题:AG-UI 协议要求 resume 运行的 改动点:
效果:resume 后事件流正确输出: {
"type": "RUN_STARTED",
"runId": "run_002",
"parentRunId": "run_001"
} |
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.
AG-UI protocol requires
RUN_STARTEDevents from resume runs to carryparentRunIdreferencing the interrupted run, creating a lineage chain. This was missing.Changes
AGUIEventEmitter: Acceptparent_run_id, propagate toRunStartedEventagent.run_agui(): Accept optionalparent_run_idparameteragent._pending_interrupt: Storerun_idat interrupt time for hot-path resume lookupagent_service.resume_agui(): Extract interrupted run ID from memory (hot) or DB round (cold), pass asparent_run_id_load_persisted_interrupt(): Returnround_idfor cold recovery pathAfter resume, the event stream now correctly emits:
{ "type": "RUN_STARTED", "threadId": "thread_001", "runId": "run_002", "parentRunId": "run_001" }Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
openaipublic.blob.core.windows.net/usr/bin/python python -m pytest tests/test_ask_user_tool.py -v(dns block)/usr/bin/python python -m pytest tests/ -v --ignore=tests/test_api_routes.py --ignore=tests/test_history_service.py --ignore=tests/test_llm.py --ignore=tests/test_startup_cleanup.py(dns block)/usr/bin/python python -m pytest tests/test_ask_user_tool.py tests/test_agent.py -v(dns block)If you need me to access, download, or install something from one of these locations, you can either: