fix: use upstream ACP notification ordering - #2389
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1cf5b56. Configure here.
| # /// script | ||
| # requires-python = ">=3.10,<3.15" | ||
| # dependencies = ["agent-client-protocol==0.11.0"] | ||
| # dependencies = ["agent-client-protocol==0.12.1"] |
There was a problem hiding this comment.
Nonexistent ACP dependency pin
High Severity
The standalone runner now pins agent-client-protocol==0.12.1, but that Python SDK release does not appear on PyPI (latest is 0.12.0). Fresh uv installs of this script fail dependency resolution, so every ACP harness that loads runner.py cannot start.
Reviewed by Cursor Bugbot for commit 1cf5b56. Configure here.
| if message_id is not None and message_id != self.message_id: | ||
| self.visible_reply = "" | ||
| self.message_id = message_id | ||
| self.visible_reply += update.content.text |
There was a problem hiding this comment.
Late update race restored
High Severity
The one-second grace wait and asyncio.Condition around session_update were removed on the claim that upstream prompt() now awaits prior update handlers. That fix is not present in any published Python SDK release, so prompt() can still return before text or tool updates are applied and trigger false empty-reply failures.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 1cf5b56. Configure here.
ApprovabilityVerdict: Needs human review Unresolved review comments identify that the pinned dependency version 0.12.1 may not exist on PyPI, and the removal of race condition handling relies on an upstream fix that may not be in a published release. Human review recommended to verify the dependency version and confirm upstream behavior. You can customize Macroscope's approvability policy. Learn more. |


What changed
agent-client-protocol==0.11.0to0.12.1asyncio.ConditionWhy
ACP Python SDK #129, released in 0.12.1, makes
ClientSideConnection.prompt()wait for precedingsession/updatehandlers on both success and error responses. That is the ordering race the Verifiers workaround compensated for, so keeping the downstream timer adds latency and redundant state.The separate 10-second graceful process shutdown bound is unchanged.
Validation
uv run pytest tests/v1 -m 'not e2e' -qtest_acp_resume_with_tool[rlm-acp-in-docker](1 passed)test_acp_resume_with_tool[rlm-acp-in-prime-vm](1 passed); confirmed zero activevf-cisandboxes afterwardNote
Low Risk
Dependency bump and removal of redundant timing logic in the ACP harness runner; no auth, data, or broader API surface changes.
Overview
Bumps the standalone ACP runner dependency from
agent-client-protocol==0.11.0to0.12.1, which upstream now orderssession/updatehandling beforeprompt()returns.Removes the Verifiers workaround: the
LATE_UPDATE_GRACE_SECONDStimer,asyncio.ConditiononVerifiersACPClient, and the post-promptwait for visible text.session_updatestill accumulates tool status and reply text; empty-reply checks and tool-only completion validation are unchanged.Reviewed by Cursor Bugbot for commit 1cf5b56. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Remove late-update grace period from ACP notification ordering in
promptagent-client-protocoldependency from0.11.0to0.12.1to use upstream notification ordering, which makes late-update waiting unnecessary.output_changedasyncioConditionfromVerifiersACPClientand the corresponding notify/wait logic insession_updateandprompt.promptno longer waits up to 1 second for a late visible text reply; it checksclient.visible_replyimmediately and raisesRuntimeErrorif no reply is present on a non-tool turn.Macroscope summarized 1cf5b56.