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
Subagent tool calls silently abort with MessageAbortedError (zero response tokens) on custom Anthropic provider — 1.18.4+ #39456
opencode: 1.18.4, 1.18.8, 1.18.9 (occasional success on 1.18.3; 100% reproducible from 1.18.4)
Custom provider: Anthropic protocol, model deepseek-v4-pro
Problem
When the main agent spawns a subagent via the task tool, the subagent receives its prompt normally and decides to call a tool (e.g. read, glob, grep). At that point the tool call never completes — it hangs with "Tool execution aborted" (MessageAbortedError) until the subagent times out. The subagent produces no output and the main agent receives nothing back, silently degrading the task.
Main-agent tool calls in the same session work fine. Only subagent tool execution is affected.
Evidence (from opencode.db)
message table: All aborted messages show {input: 0, output: 0} tokens — opencode dispatched the API request but never received any response tokens.
part table tool stats: Main agent — 6957 completed. Subagent — 2073 completed / 65 errors, of which 47 are "Tool execution aborted" (5–53 minute hangs).
Intermittent: Failures and successes interleave within the same parent session. Retrying the same subagent task often succeeds immediately.
Skewed distribution: 79% of failures came from one parent session (768 messages, 631 tool calls, ~165 hours alive). However, another parent with 5000+ messages and 4000+ tool calls had zero subagent failures — session size alone is not sufficient.
Concurrent correlation: Multiple failure timestamps coincide with parent task tool errors, suggesting parent session state propagates to child subagents.
Hypothesis
Client-side race condition or connection issue in the subagent subsystem. The request is dispatched but opencode never receives any response tokens. Long-lived parent sessions and heavy tool usage increase the probability, but the intermittent nature suggests a timing issue rather than a deterministic threshold.
Activity
github-actions commentedon Jul 29, 2026
This issue might be a duplicate of existing issues. Please check:
github-actions commentedon Sep 28, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.