Repository navigation
Implement ACP bridge lifecycle handlers - #78880
Conversation
|
Codex review: passed. Summary Reproducibility: not applicable. this is a maintainer feature and compatibility PR rather than a standalone bug report. Source inspection still confirms the current-main gap: OpenClaw pins SDK 0.21.0, whose dispatcher calls listSessions/resumeSession/closeSession, while current main only exposes unstable_listSessions for listing. Real behavior proof Next step before merge Security Review detailsBest possible solution: Land the bridge-local lifecycle implementation after exact-head checks finish, preserving the cwd/cursor filtering and close-cleanup regression coverage. Do we have a high-confidence way to reproduce the issue? Not applicable; this is a maintainer feature and compatibility PR rather than a standalone bug report. Source inspection still confirms the current-main gap: OpenClaw pins SDK 0.21.0, whose dispatcher calls listSessions/resumeSession/closeSession, while current main only exposes unstable_listSessions for listing. Is this the best way to solve the issue? Yes; implementing the stable ACP methods in src/acp/translator.ts with session-store cleanup in src/acp/session.ts is the narrow maintainable boundary. The only remaining gate I saw is exact-head CI completion, not a code repair. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against c41a73b82829. |
c098490 to
b3b4725
Compare
0759d3c to
039e1af
Compare
039e1af to
089edb7
Compare
|
/clawsweeper automerge |
|
🦞🧹
Draft PRs stay fix-only until GitHub marks them ready for review. Pause with Automerge progress:
|
* Implement ACP bridge lifecycle handlers * docs: add acp smoke evidence example * docs: trim acp smoke example * docs: remove acp pr plan file * fix: tighten acp session list filters --------- Co-authored-by: Alex Knight <[email protected]>
* Implement ACP bridge lifecycle handlers * docs: add acp smoke evidence example * docs: trim acp smoke example * docs: remove acp pr plan file * fix: tighten acp session list filters --------- Co-authored-by: Alex Knight <[email protected]>
* Implement ACP bridge lifecycle handlers * docs: add acp smoke evidence example * docs: trim acp smoke example * docs: remove acp pr plan file * fix: tighten acp session list filters --------- Co-authored-by: Alex Knight <[email protected]>
* Implement ACP bridge lifecycle handlers * docs: add acp smoke evidence example * docs: trim acp smoke example * docs: remove acp pr plan file * fix: tighten acp session list filters --------- Co-authored-by: Alex Knight <[email protected]>
Summary
session/list,session/resume, andsession/closehandlers against the current@agentclientprotocol/sdkmethod names.cwdvalidation/filtering, resume-without-replay behavior, and close cleanup that cancels active bridge work and resolves pending prompts ascancelled.Verification
pnpm check:changedpnpm test:changedpnpm docs:listpnpm check:docsgit diff --check origin/main...HEADopenclaw acpover stdio with@agentclientprotocol/sdk, and verifiedinitialize,newSession,listSessions,resumeSession,closeSession, duplicate close rejection, and missing resume rejection. Leasetbx_01kr0xjfdm7pdc5071fv8m89rw, Actions run, exit 0.openclaw acpover stdio with raw ACP JSON-RPC frames, captured server responses and Gateway logs, and verifiedinitialize,session/new,session/list,session/resume,session/close, duplicate close rejection, and missing resume rejection. Runrun_2f5648ee30ad, leasecbx_5505f5580f81, exit 0. The lease was stopped after capture.Testing Evidence Example
The AWS Crabbox smoke sent representative ACP JSON-RPC frames to
openclaw acpover stdio:{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":1,"clientCapabilities":{"fs":{"readTextFile":false,"writeTextFile":false},"terminal":false},"clientInfo":{"name":"openclaw-acp-crabbox-evidence","version":"1.0.0"}}} {"jsonrpc":"2.0","id":3,"method":"session/list","params":{"cwd":"/tmp/openclaw-acp-evidence-4jaUEQ/workspace","_meta":{"limit":5}}} {"jsonrpc":"2.0","id":4,"method":"session/resume","params":{"sessionId":"agent:main:acp-smoke","cwd":"/tmp/openclaw-acp-evidence-4jaUEQ/workspace","mcpServers":[]}} {"jsonrpc":"2.0","id":5,"method":"session/close","params":{"sessionId":"agent:main:acp-smoke"}}The OpenClaw ACP server response shape included the stable lifecycle capabilities and a Gateway-backed session list:
{ "initialize": { "protocolVersion": 1, "agentCapabilities": { "loadSession": true, "sessionCapabilities": { "list": {}, "resume": {}, "close": {} } }, "agentInfo": { "name": "openclaw-acp", "title": "OpenClaw ACP Gateway", "version": "2026.5.6" } }, "listSessions": { "sessions": [ { "sessionId": "agent:main:acp-smoke", "cwd": "/tmp/openclaw-acp-evidence-4jaUEQ/workspace", "title": "ACP seeded gateway session", "updatedAt": "2026-05-07T00:00:00.000Z", "_meta": { "sessionKey": "agent:main:acp-smoke", "kind": "direct" } } ], "nextCursor": null }, "closeSession": {} }The same run captured ACP update notifications and the live Gateway log proof:
{ "notificationTypes": [ "session_info_update", "available_commands_update", "session_info_update", "usage_update", "available_commands_update" ], "gatewayLogTail": [ "[gateway] ready", "[ws] ⇄ res ✓ sessions.list 305ms" ] }Note: the evidence smoke avoided
openclaw gateway call sessions.listas the sole proof because that CLI path can request a fresh-token operator scope upgrade. The ACP bridge was verified through ACP stdio frames plus the live Gatewaysessions.listresponse log.Notes
docs/refactor/external-scheduler-plan.mdanddocs/refactor/heartbeat-hosted-scheduler-notes.mdremain local untracked files and are not part of this PR.