You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
openclaw ACP adapter: finishPrompt clears streamed-text offsets for all sessions, duplicating the still-running session's text (#3997) #4616
When two sessions have prompts in flight, completing either one clears the streamed-text offsets for both, duplicating already-delivered text for the still-running session. Codex (P2, PR #3997):
The next cumulative text update for the still-running session is then emitted from character zero, duplicating content already delivered to its ACP client. Exercising the current handlers with session B emitting Hello, session A becoming idle, and B updating its part to Hello world produces the concatenated output HelloHello world. Keep offsets scoped to each session and remove only the completed session's entries.
Still live on current main (verified by raw read 2026-11-02): bin/opencode-acp-adapter.mjs:290 — finishPrompt() calls partTextSent.clear(), wiping every session's offsets whenever any one prompt finishes.
Acceptance criteria
Streamed-text offsets are scoped per session: finishing one session's prompt removes only that session's entries.
A regression test covers two concurrent sessions where one completes and the other's cumulative text update is not re-emitted from character zero.
Or the finding is resolved by a documented decision on this issue.
Task: Triage the validated finding: finishPrompt clears streamed-text offsets for all sessions, so a still-running session's text is re-emitted from character zero (thread unresolved, no reply, no post-comment fix commit, PR merged as-is, still live on current main)
Expectation: effort s — queue worker verifies against current main, then fixes or documents a decision
agent-note:v1
event: picked_up
task: 6518 (repo-health-code-pilot; worker repo-worker-code; OpenChamber scheduled lane 02cafe76-eafd-4d0b-aaa6-2b7a737d68dc)
action: triage revalidation against current source in progress.
agent-note:v1
event: triaged
task: 6518 (repo-health-code-pilot; worker repo-worker-code; OpenChamber scheduled lane 02cafe76-eafd-4d0b-aaa6-2b7a737d68dc)
verdict: CONFIRMED on origin/main 12da950. bin/opencode-acp-adapter.mjs declares partTextSent as a shared Map keyed only by part.id (line 129); streamPartText(sessionId, part, delta) reads/writes that key without session scoping (221-228); finishPrompt(sessionId, ...) clears the whole map (286-291). This matches the two-session duplication report. Focused test file bin/opencode-acp-adapter.test.mjs exists; no open fix PR found.
route: enqueued scoped small_fix task 6534 to key offsets by session+part and add the concurrent-session cumulative-text regression test. Note: the source issue is 4616; the packet's unrelated home/openclaw/default.nix scope entry was excluded from the follow-up.
Session / ID: task 8434 (repo-fleet-monitor run 2026-11-05T15:45:48Z)
Found via: monitor reconciliation (Duty 1 claim/label divergence repair)
Task: Claim evaporated: task 8434 is queued and unclaimed in repo-health-code-pilot, but this issue still carried claimed labels. Labels reset to the truth (queue/queued + status/needs-triage). Checkpoint stage at evaporation: handed_off.
Expectation: The next lane claim picks task 8434 up from the queued state and posts a fresh pickup note.
Picked up by repo-worker-code-f — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while repo-worker-code-f posts progress markers; after 30 minutes of silence any other worker may pick this up.)
Lane F shift 2026-11-06 fallback pickup: triage — verify that the openclaw ACP adapter's finishPrompt clears streamed-text offsets for all sessions, against current main.
Agent: queue worker (repo-worker-code), lane code-f — FALLBACK MODE (queue backend down, code#6619; the fallback claim marker on this issue is the claim of record)
Expectation: verdict + evidence on this issue; fix routed as a follow-up claimable item if confirmed. Per pr-comment-review rules, no reply to the source PR thread from this work.
Process note: posted via the developing.today GitHub App route — the user token is under a GitHub secondary rate limit this shift, per the standing rate-limit fallback order.
Progress from repo-worker-code-f: verified: NO LONGER REPRODUCIBLE — the cumulative-offset mechanism was deleted wholesale by the server v2 migration (commit 744ced9, #4614, 2026-11-03): partTextSent and its .clear() in finishPrompt are gone (0 occurrences repo-wide on main); streaming is now true per-session deltas. Next: closing this issue with the evidence.
🤖 Agent note · done (triage verdict: NO LONGER REPRODUCIBLE — mechanism removed by the #4614 v2 migration; closing)
Agent: queue worker (repo-worker-code), lane code-f — FALLBACK MODE (queue backend down, code#6619; fallback claim markers on this issue are the claim of record)
Verdict: NO LONGER REPRODUCIBLE — the finding was accurate when filed; the mechanism it describes no longer exists
Verified fresh this shift against current main (bin/opencode-acp-adapter.mjs, blob 59a1618a, 572 lines):
partTextSent has zero occurrences in the entire repo on current main (code search), and finishPrompt (lines 339-350) now touches only the finishing session's own state: pendingPrompts.delete(sessionId) and cancelledSessions.delete(sessionId).
The removal is attributable, not drift: commit 744ced90a (2026-11-03, "fix(acp-adapter): migrate to the standing server v2 session API (openclaw ACP adapter: use the standing server's v2 session API — v1 /session + prompt_async contract cannot create working sessions (#3997) #4614)") deletes the partTextSent Map, its offset arithmetic, and the partTextSent.clear() line from finishPrompt (all visible as - lines in that commit's patch for this file), replacing cumulative-part diffing with true delta events: session.text.delta → streamDelta(sessionId, 'text', data.delta), which forwards the serve-provided delta verbatim for that session only. There is no shared cross-session streaming state left to clear.
Tests: bin/opencode-acp-adapter.test.mjs covers the delta-streaming path (session.text.delta → session/update, chunks joining to the full text). The two-session regression test the criteria named is moot: it would protect a shared offset map that the migration deleted; with per-session delta forwarding there is no offset to re-emit from character zero.
Per this issue's own acceptance criteria ("or the finding is resolved by a documented decision on this issue") and the fleet rule that already-fixed issues close with evidence rather than manufactured work: closing #4616 as superseded by #4614. No reply is made to the source PR #3997 thread (pr-comment-review rules). If the adapter ever returns to cumulative part updates, the per-session scoping requirement in the criteria is the contract to reinstate.
Released by repo-worker-code-f (outcome: done). Triaged NO LONGER REPRODUCIBLE (verdict note on #4616: commit 744ced9 / #4614 deleted the partTextSent offset map and its cross-session clear; streaming is per-session true deltas on current main, blob 59a1618a). Issue closed with the evidence; no fix work remains.
Activity
dezren39 commentedon Nov 2, 2026
🤖 Agent note · filed
dezren39 commentedon Nov 2, 2026
agent-note:v1
event: picked_up
task: 6518 (repo-health-code-pilot; worker repo-worker-code; OpenChamber scheduled lane 02cafe76-eafd-4d0b-aaa6-2b7a737d68dc)
action: triage revalidation against current source in progress.
dezren39 commentedon Nov 2, 2026
agent-note:v1
event: triaged
task: 6518 (repo-health-code-pilot; worker repo-worker-code; OpenChamber scheduled lane 02cafe76-eafd-4d0b-aaa6-2b7a737d68dc)
verdict: CONFIRMED on origin/main 12da950. bin/opencode-acp-adapter.mjs declares partTextSent as a shared Map keyed only by part.id (line 129); streamPartText(sessionId, part, delta) reads/writes that key without session scoping (221-228); finishPrompt(sessionId, ...) clears the whole map (286-291). This matches the two-session duplication report. Focused test file bin/opencode-acp-adapter.test.mjs exists; no open fix PR found.
route: enqueued scoped small_fix task 6534 to key offsets by session+part and add the concurrent-session cumulative-text regression test. Note: the source issue is 4616; the packet's unrelated home/openclaw/default.nix scope entry was excluded from the follow-up.
52 remaining items
dezren39 commentedon Nov 5, 2026
🤖 Agent note · handed off
developing-today commentedon Nov 7, 2026
Picked up by
repo-worker-code-f— working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live whilerepo-worker-code-fposts progress markers; after 30 minutes of silence any other worker may pick this up.)Lane F shift 2026-11-06 fallback pickup: triage — verify that the openclaw ACP adapter's finishPrompt clears streamed-text offsets for all sessions, against current main.
developing-today commentedon Nov 7, 2026
🤖 Agent note · picked up
repo-worker-code-f(issue openclaw ACP adapter: finishPrompt clears streamed-text offsets for all sessions, duplicating the still-running session's text (#3997) #4616 is the task in fallback mode)finishPromptglobal offset-clear (PR feat(openclaw): ACP-to-HTTP adapter so OpenClaw shares the standing opencode serve (#1243) #3997 Codex P2 finding) against current maindeveloping-today commentedon Nov 7, 2026
Progress from
repo-worker-code-f: verified: NO LONGER REPRODUCIBLE — the cumulative-offset mechanism was deleted wholesale by the server v2 migration (commit 744ced9, #4614, 2026-11-03):partTextSentand its.clear()in finishPrompt are gone (0 occurrences repo-wide on main); streaming is now true per-session deltas. Next: closing this issue with the evidence.developing-today commentedon Nov 7, 2026
🤖 Agent note · done (triage verdict: NO LONGER REPRODUCIBLE — mechanism removed by the #4614 v2 migration; closing)
repo-worker-code-f(issue openclaw ACP adapter: finishPrompt clears streamed-text offsets for all sessions, duplicating the still-running session's text (#3997) #4616 is the task in fallback mode)finishPromptclears streamed-text offsets for all sessionsVerdict: NO LONGER REPRODUCIBLE — the finding was accurate when filed; the mechanism it describes no longer exists
Verified fresh this shift against current main (
bin/opencode-acp-adapter.mjs, blob59a1618a, 572 lines):partTextSenthas zero occurrences in the entire repo on current main (code search), andfinishPrompt(lines 339-350) now touches only the finishing session's own state:pendingPrompts.delete(sessionId)andcancelledSessions.delete(sessionId).744ced90a(2026-11-03, "fix(acp-adapter): migrate to the standing server v2 session API (openclaw ACP adapter: use the standing server's v2 session API — v1 /session + prompt_async contract cannot create working sessions (#3997) #4614)") deletes thepartTextSentMap, its offset arithmetic, and thepartTextSent.clear()line fromfinishPrompt(all visible as-lines in that commit's patch for this file), replacing cumulative-part diffing with true delta events:session.text.delta→streamDelta(sessionId, 'text', data.delta), which forwards the serve-provided delta verbatim for that session only. There is no shared cross-session streaming state left to clear.125418eee), and its guard comment is visible in the currentfinishPrompt.bin/opencode-acp-adapter.test.mjscovers the delta-streaming path (session.text.delta→session/update, chunks joining to the full text). The two-session regression test the criteria named is moot: it would protect a shared offset map that the migration deleted; with per-session delta forwarding there is no offset to re-emit from character zero.Per this issue's own acceptance criteria ("or the finding is resolved by a documented decision on this issue") and the fleet rule that already-fixed issues close with evidence rather than manufactured work: closing #4616 as superseded by #4614. No reply is made to the source PR #3997 thread (pr-comment-review rules). If the adapter ever returns to cumulative part updates, the per-session scoping requirement in the criteria is the contract to reinstate.
developing-today commentedon Nov 7, 2026
Released by
repo-worker-code-f(outcome: done). Triaged NO LONGER REPRODUCIBLE (verdict note on #4616: commit 744ced9 / #4614 deleted the partTextSent offset map and its cross-session clear; streaming is per-session true deltas on current main, blob 59a1618a). Issue closed with the evidence; no fix work remains.