Repository navigation
Description
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
Summary
In the ACP bridge (dist/acp-cli-*.js, source under src/.../acp), newSession()
awaits sendSessionSnapshotUpdate() — which emits a session_info_update
session/update notification — BEFORE returning the session/new JSON-RPC
result. Clients that key off session_info_update to learn the session's
sessionId receive the notification before they've parsed the result, so the
notification references a sessionId they haven't learned yet.
Version
openclaw 2026.7.1
Repro
Use scripts/r1-acp-verify.py from github.com/FUSED-ID/m4-macbook-pro-setup
against a local openclaw ACP bridge instance. It captures the raw JSON-RPC
stream on stdout and asserts message ordering. Run:
python3 r1-acp-verify.py --target
It fails on stock openclaw 2026.7.1 with the notification preceding the
result; passes after the local patch described below.
Expected vs actual ordering
Expected: session/new result (with sessionId) → session_info_update
notification (referencing that sessionId).
Actual: session_info_update notification (sessionId not yet known to
client) → session/new result.
Impact
Rabbit R1's rabbit-agent (closed-source node service) gates session/prompt
delivery on receiving session_info_update after the result. With the
current ordering, sessions never receive a prompt and hang indefinitely.
Suggested fix location
newSession() in the ACP bridge — defer the sendSessionSnapshotUpdate()
call until after the session/new result is returned/flushed (e.g.
setTimeout(..., 0) or a microtask deferred past the RPC response write).
We validated a 30ms setTimeout defer locally as a workaround; a proper fix
should guarantee ordering without relying on a timer.
Local workaround (not proposed as the fix, just proof of concept)
See patch script in a private fork: defers the snapshot emission by 30ms.
Happy to share the diff if useful.
Steps to reproduce
- Start a local openclaw ACP bridge instance (openclaw 2026.7.1).
- Run scripts/r1-acp-verify.py from github.com/FUSED-ID/m4-macbook-pro-setup
against it: python3 r1-acp-verify.py --target - Observe the captured JSON-RPC stream: the session_info_update
notification arrives before the session/new result, instead of after. - Script assertion on message ordering fails on stock 2026.7.1; passes
after deferring the notification (see local workaround in description).
Expected behavior
The session/new JSON-RPC result (containing the sessionId) should be
returned/flushed to the client before the session_info_update
notification for that session is emitted. Clients should never receive a
session_info_update referencing a sessionId they haven't learned yet.
Actual behavior
newSession() in the ACP bridge awaits sendSessionSnapshotUpdate() — which
emits the session_info_update notification — BEFORE returning the
session/new result. So the notification is sent first, referencing a
sessionId the client hasn't received yet. Downstream, Rabbit R1's
rabbit-agent gates prompt delivery on receiving session_info_update after
the result, so with this ordering R1 sessions hang indefinitely.
Version: openclaw 2026.7.1
Suggested fix: defer sendSessionSnapshotUpdate() until after the
session/new result is returned/flushed. We validated a 30ms setTimeout
defer locally as a workaround.
OpenClaw version
2026.7.1
Operating system
CLAW (droplet): Ubuntu 24.04.4 LTS, kernel 6.8.0-134-generic with M4: macOS 26.5.2 (build 25F84)
Install method
systemd service (oc-update managed)
Model
openai-codex/gpt-5.4
Provider / routing chain
openclaw -> openai-codex (direct)
Additional provider/model setup details
Anthropic dropped as of 2026-04-11 policy change. Primary model
openai-codex/gpt-5.4, fallbacks grok-3-mini, grok-3, gemini-2.5-flash.
Not model-specific — this is a protocol-level ACP ordering bug,
reproducible independent of which model is configured.
Logs
Screenshots, recordings, and evidence
No response
Impact and severity
No response
Additional information
No response
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jul 17, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed September 5, 2026, 2:41 PM ET / 18:41 UTC.
Summary
The ordering defect remains in current main and v2026.9.1. The linked open repair PR already owns the work, so this issue should remain open without another repair branch.
Reproducibility: yes. at source level: newSession awaits notification delivery before returning, and the ACP SDK responds only after the handler resolves. No runtime reproduction was executed in this read-only review.
Next step
Review and resolve #110455 as the existing repair candidate; another fix PR would duplicate that work.
Review details
Best possible solution:
Guarantee result-before-update ordering at the ACP output boundary while preserving existing-session replay and streaming, through the linked repair PR.
Do we have a high-confidence way to reproduce the issue?
Yes, at source level: newSession awaits notification delivery before returning, and the ACP SDK responds only after the handler resolves. No runtime reproduction was executed in this read-only review.
Is this the best way to solve the issue?
A deterministic output-ordering guarantee is the appropriate repair; a timer does not establish that guarantee. The linked PR’s complete implementation still needs its own review.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning medium; reviewed against 9d5ebf6bc948.
Label changes
Label justifications:
P1: A source-supported ordering defect in the shipped ACP bridge can prevent affected clients from progressing to prompt delivery.impact:session-state: Initial session notifications reach clients before the response that introduces their session identity.Evidence reviewed
What I checked:
src/acp/translator.session-lifecycle.ts:87, 9d5ebf6bc948)src/acp/translator.session-updates.ts:141, 9d5ebf6bc948)src/acp/server.ts:247, 9d5ebf6bc948)src/acp.ts:1060)src/jsonrpc.ts:1038)src/acp/translator.session-lifecycle.ts:87, ad6fe23aecb9)Likely related people:
How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.