Repository navigation
fix(acp): bound sessions lose replies and streamed text - #168989
Conversation
Keep raw harness sessions owned by the requesting configured agent, preserve legacy storage during bound dispatch, and explicitly distinguish answer deltas from replacement snapshots. Co-authored-by: steipete <[email protected]>
Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: 7d643889-8ed4-45db-a8ed-da7e708caeae
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesThis PR separates ACP harness identity from configured reply-runtime ownership and preserves incremental Telegram answer text. Example: The main agent runs
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Partial Merge readiness⛔ Blocked before merge - 4 items remain Keep this maintainer-authored PR open: it addresses a current ACP dispatch failure and Telegram answer loss, and both earlier code findings are resolved. Priority: P1 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherChannel routing supplies a bound session and configured-owner observations to reply dispatch; ACP executes the harness, and the reply projector sends chunks through channel delivery. flowchart LR
A[Channel message] --> B[Binding route observations]
B --> C[Configured runtime admission]
C --> D[ACP session manager]
D --> E[Reply projector]
E --> F[Reply normalization]
F --> G[Telegram preview and final delivery]
Technical reviewBest possible solution: Keep the shared ownership repair and explicit chunk contract, with inspectable authorization evidence and a stable-release upgrade preserving existing sessions. Do we have a high-confidence way to reproduce the issue? Source confirms that binding projection can replace both session and agent identity with an unconfigured harness before runtime lookup; the linked report records the resulting production failures. Is this the best way to solve the issue? The shared resolver reuses existing binding observations, preserves legacy storage ownership, and marks chunk semantics explicitly rather than inferring them from text prefixes. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 86c2aae466c5. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: No concrete bypass was found, but the newly enabled legacy execution path still requires inspectable final-effect authorization evidence. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +100, Tests +412, Docs +15, Other +2. Total +529 across 21 files. Added test files: 1. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 11, 2026, 2:35 PM ET / 18:35 UTC (Revision 2). |
Keep normalization-owned response prefixes distinct from authored chunk text. Preserve accumulated answer previews before final status notices and cover legacy binding revocation and reopening. Co-authored-by: steipete <[email protected]>
Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: 89924c70-65be-4edc-8fe6-a40386857aa4
Integrate current main only to resolve the conflicting additive surface budget. Preserve the independent preview helper and main additions. Focused composition tests and SDK surface verification pass. Co-authored-by: steipete <[email protected]>
Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: deac41a4-806a-47b9-9e76-172f8293cdd8
|
Merged via squash.
|
) * fix(acp): bound sessions lose replies and streamed text Keep raw harness sessions owned by the requesting configured agent, preserve legacy storage during bound dispatch, and explicitly distinguish answer deltas from replacement snapshots. Co-authored-by: steipete <[email protected]> * fix(acp): bound sessions lose replies and streamed text Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: 7d643889-8ed4-45db-a8ed-da7e708caeae * fix(telegram): preserve decorated ACP previews and notices Keep normalization-owned response prefixes distinct from authored chunk text. Preserve accumulated answer previews before final status notices and cover legacy binding revocation and reopening. Co-authored-by: steipete <[email protected]> * fix(acp): bound sessions lose replies and streamed text Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: 89924c70-65be-4edc-8fe6-a40386857aa4 * fix(acp): bound sessions lose replies and streamed text Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: deac41a4-806a-47b9-9e76-172f8293cdd8 --------- Co-authored-by: steipete <[email protected]>
First-parent upstream 0bc7491..408a1f3 (53 commits, including openclaw#169164 cold session/memory SQL off the Gateway main thread, openclaw#169173 per-turn SQLite bookkeeping, openclaw#169207 coalesced tool-result actor admissions, openclaw#169238 inter-session envelope bytes, openclaw#168989 ACP replies). Conflict: - plugin-sdk-surface-report.mts: upstream budgets 3673/2134; ours stays +11/+4 on top (3684/2138). Drag removed against upstream: - plugin-sdk-surface-report.mts: dropped the "+1: createSessionHeaderLink" budget comments; upstream added them in openclaw#158742 and retired them in openclaw#165334, and no such export exists any more. - normalize-reply.ts: restored upstream's blank line before bindNormalizeReplyTransformOwner (formatting-only overlay noise). Auto-merged files that carry continuation overlay (normalize-reply, sqlite-entry-store, user-turn-transcript, baselines, vitest paths) keep the overlay byte-for-byte. Worker access inventory regenerated. Refs #1475 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nclaw#182005) openclaw#168989 keeps /acp spawn sessions for raw harness ids (claude, codex) owned by the requesting configured agent, but the live ACP bind test still asserted agent:<harness>:acp:, so the lane failed at the bind step on every run. Assert the owner the spawn contract defines instead.
Related: #146365
What Problem This Solves
Fixes ACP-bound conversations failing to select a configured reply runtime and Telegram previews replacing earlier answer chunks.
User Impact
New raw-harness ACP sessions remain owned by the requesting OpenClaw agent. Existing bound harness sessions retain their original storage and transcripts while dispatching through the inspected channel owner. Telegram keeps incremental answer text visible without concatenating separate final replies.
Why This Change Was Made
Keep configured ownership separate from the external harness namespace. Preserve participant recording instead of hiding foreign-key failures by disabling it. Mark disjoint ACP text chunks explicitly; ordinary snapshots and final replies remain replacements, including text rewritten in place by delivery hooks. Existing metadata migration/read behavior is unchanged.
Evidence
/acp spawn proof-harness --bind herecreates a main-owned session; the next user message reaches a deterministic ACP protocol peer. The same Telegram message changes from the first chunk to both chunks with one configured[proof]prefix. The late session-status notice is a separate message rather than overwriting the answer. This exercises the changed paths, not a normal mock-provider reply; no paid model was used.Captured Telegram and harness-boundary output (sanitized)
Native message IDs are replaced with run-local labels. The ACP peer is deterministic; Telegram and ACPX transport are real.
Compatibility scope: this PR changes neither the persisted ACP schema nor its serializers or migration readers. The legacy-key fixture reopens the stored session through a fresh manager and asserts unchanged owner/key, ACP metadata, participant history, and assistant transcript. Existing bindings are not rewritten. A full v2026.10.1 updater exercise is not claimed; it would test unrelated updater behavior rather than this unchanged storage contract.
Requested by @steipete, following review of the public
jmar5439/openclaw:test/all-fixes-2026.9.8experiments.Work sessions
Worked on by
View the OpenClaw team session