Description
After upgrading to OpenClaw 2026.3.31, ACP task completion events leak internal routing metadata and system instructions into user-facing Discord channels as plain messages.
Environment
- OpenClaw version: 2026.3.31
- Channel: Discord (guild channel with thread bindings enabled)
- ACP backend: acpx with Codex
- OS: macOS (Apple Silicon)
Steps to Reproduce
- In a Discord channel (e.g.
#proj-bimaterial), have a conversation with the agent
- Agent spawns a Codex ACP session via
sessions_spawn — a thread "🤖 codex" is created
- Codex completes the task successfully
- The channel receives
"Background task done: ACP background task (run cdfe1eff)."
- Run
/status in the channel
Observed Behavior
The agent posts multiple messages (5-6) into the channel containing:
- The full raw task completion result (internal child result with
<<<BEGIN_UNTRUSTED_CHILD_RESULT>>> / <<<END_UNTRUSTED_CHILD_RESULT>>> markers)
- Internal runtime stats:
Stats: runtime 6m14s • tokens 0 (in 0 / out 0)
- Internal routing instructions:
"Action: A completed subagent task is ready for user delivery. Convert the result above into your normal assistant voice and send that user-facing update now. Keep this internal context private..."
- Runtime configuration metadata:
"⚙️ Runtime: direct · Think: adaptive", "👥 Activation: mention · 🪢 Queue: collect (depth 0)"
This internal metadata should never reach user-facing channels.
Expected Behavior
- Task completion results should be sanitized before delivery — only the human-readable summary should be sent
- Internal routing instructions (
Action: ...) should be stripped
- Runtime metadata and stats should not be included in user-visible messages
- The delivery should be a single, clean message summarizing what the agent accomplished
Timeline (UTC+8, 2026-04-01)
| Time |
Event |
| 20:47-20:52 |
Normal conversation in channel |
| 20:53 |
Agent spawns Codex, thread "🤖 codex" created |
| 20:59:33 |
"Background task done: ACP background task" appears in channel |
| 21:00:08-21:00:14 |
User runs /status → agent dumps 5-6 messages with raw internal metadata into channel |
Related
Additional Context
This appears related to the new task flow routing introduced in 2026.3.31 ("route one-task ACP and subagent updates through a parent task-flow owner context"). The completion event is being delivered raw instead of being processed through the normal sanitization/rewriting pipeline.
Description
After upgrading to OpenClaw 2026.3.31, ACP task completion events leak internal routing metadata and system instructions into user-facing Discord channels as plain messages.
Environment
Steps to Reproduce
#proj-bimaterial), have a conversation with the agentsessions_spawn— a thread "🤖 codex" is created"Background task done: ACP background task (run cdfe1eff)."/statusin the channelObserved Behavior
The agent posts multiple messages (5-6) into the channel containing:
<<<BEGIN_UNTRUSTED_CHILD_RESULT>>>/<<<END_UNTRUSTED_CHILD_RESULT>>>markers)Stats: runtime 6m14s • tokens 0 (in 0 / out 0)"Action: A completed subagent task is ready for user delivery. Convert the result above into your normal assistant voice and send that user-facing update now. Keep this internal context private...""⚙️ Runtime: direct · Think: adaptive","👥 Activation: mention · 🪢 Queue: collect (depth 0)"This internal metadata should never reach user-facing channels.
Expected Behavior
Action: ...) should be strippedTimeline (UTC+8, 2026-04-01)
"Background task done: ACP background task"appears in channel/status→ agent dumps 5-6 messages with raw internal metadata into channelRelated
Additional Context
This appears related to the new task flow routing introduced in 2026.3.31 ("route one-task ACP and subagent updates through a parent task-flow owner context"). The completion event is being delivered raw instead of being processed through the normal sanitization/rewriting pipeline.