-
-
Notifications
You must be signed in to change notification settings - Fork 69.2k
[Bug]: ACP truncates final assistant chunk before end_turn on node-connected path #15377
Copy link
Copy link
Closed
pjeby/openclaw
#1Labels
bugSomething isn't workingSomething isn't workingstaleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Summary
ACP streaming sometimes drops the final tail of assistant output.
The run still finishes with stopReason: "end_turn", but the last chunk text is incomplete.
Steps to reproduce
- Start ACP bridge:
openclaw acp --verbose - Send:
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":1}} - Create session:
{"jsonrpc":"2.0","id":2,"method":"session/new","params":{"cwd":"/home/jaesbit/Work/openclaw-tests","mcpServers":[]}} - Send long prompt with explicit end marker:
{"jsonrpc":"2.0","id":3,"method":"session/prompt","params":{"sessionId":"<SESSION_ID>","prompt":[{"type":"text","text":"Please write a long test message in English, around 25 lines, with a title, a numbered list, and a final closing marker: END-OF-LONG-TEST-OK."}]}} - Inspect
session/updatenotifications and finalid:3response.
Expected behavior
Final streamed assistant text should be complete (including the full tail/end marker context) before end_turn.
Actual behavior
- Multiple
session/updateevents arrive withsessionUpdate: "agent_message_chunk". - The final text chunk is truncated (tail missing).
- Then ACP returns:
{"jsonrpc":"2.0","id":3,"result":{"stopReason":"end_turn"}}
Environment
- Clawdbot version: OpenClaw CLI 2026.2.9 observed locally (
openclaw --version) - OS: Linux (host environment)
- Install method (pnpm/npx/docker/etc): global npm install (
~/.npm-global/...)
Logs or screenshots
Raw ACP sample (redacted):
initializesucceeds withprotocolVersion:1session/newsucceeds and returnssessionIdsession/updateemits severalagent_message_chunkevents- Last chunk ends early (example tail:
...missing/c) - Final response is still
stopReason:"end_turn"
Additional scope notes:
- Reproduced on node-connected path (paired node setup).
- In OpenClaw Web UI, full message is visible.
- Direct same-instance ACP→gateway path has not been tested yet.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingstaleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Give feedbackNo fields configured for issues without a type.