Skip to content

fix: use upstream ACP notification ordering - #2389

Merged
hallerite merged 1 commit into
mainfrom
fix/acp-notification-order
Aug 17, 2026
Merged

fix: use upstream ACP notification ordering#2389
hallerite merged 1 commit into
mainfrom
fix/acp-notification-order

Conversation

@hallerite

@hallerite hallerite commented Aug 17, 2026

Copy link
Copy Markdown
Member

What changed

  • bump the standalone ACP runner from agent-client-protocol==0.11.0 to 0.12.1
  • remove Verifiers' one-second late-update grace timer and its asyncio.Condition
  • retain the existing tool-only completion and empty visible reply validation

Why

ACP Python SDK #129, released in 0.12.1, makes ClientSideConnection.prompt() wait for preceding session/update handlers 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' -q
  • live test_acp_resume_with_tool[rlm-acp-in-docker] (1 passed)
  • live test_acp_resume_with_tool[rlm-acp-in-prime-vm] (1 passed); confirmed zero active vf-ci sandboxes afterward
  • Ruff check and format
  • pre-push Ruff, format, and Ty

Note

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.0 to 0.12.1, which upstream now orders session/update handling before prompt() returns.

Removes the Verifiers workaround: the LATE_UPDATE_GRACE_SECONDS timer, asyncio.Condition on VerifiersACPClient, and the post-prompt wait for visible text. session_update still 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 prompt

  • Upgrades the agent-client-protocol dependency from 0.11.0 to 0.12.1 to use upstream notification ordering, which makes late-update waiting unnecessary.
  • Removes the output_changed asyncio Condition from VerifiersACPClient and the corresponding notify/wait logic in session_update and prompt.
  • Behavioral Change: prompt no longer waits up to 1 second for a late visible text reply; it checks client.visible_reply immediately and raises RuntimeError if no reply is present on a non-tool turn.

Macroscope summarized 1cf5b56.

@hallerite
hallerite marked this pull request as ready for review August 17, 2026 18:16

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ 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"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 1cf5b56. Configure here.

@macroscopeapp

macroscopeapp Bot commented Aug 17, 2026

Copy link
Copy Markdown

Approvability

Verdict: 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.

@hallerite
hallerite merged commit 464b752 into main Aug 17, 2026
13 checks passed
@hallerite
hallerite deleted the fix/acp-notification-order branch August 17, 2026 19:37
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.

3 participants