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
[BUG] Background subagent final response delivered as thousands of duplicated <acp> message-ref tags instead of report text #43746
A background subagent (task tool, background=true, general agent) completed its work correctly on disk, but the final response delivered to the parent session was corrupted: instead of the actual report text, the parent received ~11K tokens consisting of the literal string <acp tokens=N type=text>mNNNNN</acp> repeated hundreds of times, referencing the child session's own internal message IDs (e.g. m00001–m00086). Zero actual report text was delivered.
This looks like the message-reference annotation pass (ACP/bili-style context-management tags rendered as <acp ...>mNNNNN</acp> prefixes) recursing on or echoing its own output while serializing the child→parent completion payload.
Environment
OpenCode harness with ACP context-management (bili) tooling
Platform: Windows 11, PowerShell
Subagent type: general, launched with background=true
Parent received a completion event with an ~11K-token message containing only repeated <acp tokens=... type=text>mNNNNN</acp> fragments
The referenced mNNNNN ids belong to the child session, not the parent
No error surfaced anywhere; state was completed
Expected behavior
Final assistant text is delivered verbatim exactly once, with at most one annotation prefix per part
If serialization fails or final text is empty, the completion should fail loudly (or retry) rather than deliver garbage/silence
Impact
Parent agents silently lose subagent reports and must independently verify all work (which is what happened here — the work itself was fine). At ~20% of background completions misbehaving in one session, this materially erodes trust in fire-and-forget delegation.
Suggested fix
Sanitize/validate the child→parent completion payload: render annotations exactly once, strip nested/self-referential tag output, and treat an empty final text as an error state rather than a successful completion.
Not an opencode bug: the <acp> message-ref tags come from a third-party context plugin, not from opencode or the Agent Client Protocol. Please report it to that plugin.
Activity
github-actions commentedon Aug 21, 2026
This issue might be a duplicate of or closely related to existing issues. Please check:
task()returns emptycompletedinstead of surfacing the child's recorded error. The root cause analysis there (subagent turn resolving normally despite an error, with the error buried on the child session) overlaps with the silent garbage-delivery described here.completed— already referenced in this issue; covers the broader pattern of silent bad completions.nexxeln commentedon Oct 1, 2026
Not an opencode bug: the
<acp>message-ref tags come from a third-party context plugin, not from opencode or the Agent Client Protocol. Please report it to that plugin.