Resume failed OpenCode subagent work from the surfaced task_id
OpenCode v1.18.20 surfaces failed subagent tool calls with a resumable task_id, answers subagent permission prompts in opencode run, and retries more network/xAI errors—so stop discarding empty failures and resume the same task instead.Why this loop
OpenCode v1.18.20 changes the subagent failure contract: failed tool calls now surface a resumable task_id instead of an empty result. Callers that treated empty output as a no-op will silently drop recoverable work. The same release answers permission requests triggered by subagents during opencode run, retries provider responses with finish_reason: network_error plus network-error/network_error variants, and retries xAI capacity and temporary unavailability stream errors. Cerebras max_completion_tokens is preserved without an extra output cap, so stacked limiters can truncate completions the provider already bounded.
Proposed actions
- Upgrade and pin the OpenCode CLI to exactly v1.18.20 from https://github.com/anomalyco/opencode/releases/tag/v1.18.20 (OpenCode / SST).
- In every OpenCode subagent tool-call handler, if the call fails, read the surfaced resumable task_id and resume that same task_id; do not spawn a replacement task and do not treat an empty result as success.
- For unattended
opencode runjobs that launch subagents, keep the run attached so permission requests triggered by those subagents are answered in-process instead of aborting or hanging the session. - On Cerebras-backed OpenCode sessions, set max_completion_tokens as the only output limit and delete any extra application-level output cap stacked on top of it.
- Remove custom retry loops for finish_reason: network_error, the network-error/network_error variants, and xAI capacity or temporary-unavailability stream errors; v1.18.20 already retries those.
Agent prompt
Paste into your agent or query via MCP (get_agent_prompt) — free, no extra AI costOpenCode session task
DevAgentRadar → OpenCode
You are helping me adopt a real coding-assistant change. Work only from the facts below. Do not invent features.
Context
Assistant: OpenCode Proposal: Resume failed OpenCode subagent work from the surfaced task_id Summary: OpenCode v1.18.20 surfaces failed subagent tool calls with a resumable task_id, answers subagent permission prompts in opencode run, and retries more network/xAI errors—so stop discarding empty failures and resume the same task instead. Primary source: https://github.com/anomalyco/opencode/releases/tag/v1.18.20
Why it matters
OpenCode v1.18.20 changes the subagent failure contract: failed tool calls now surface a resumable task_id instead of an empty result. Callers that treated empty output as a no-op will silently drop recoverable work. The same release answers permission requests triggered by subagents during opencode run, retries provider responses with finish_reason: network_error plus network-error/network_error variants, and retries xAI capacity and temporary unavailability stream errors. Cerebras max_completion_tokens is preserved without an extra output cap, so stacked limiters can truncate completions the provider already bounded.
Suggested actions
- Upgrade and pin the OpenCode CLI to exactly v1.18.20 from https://github.com/anomalyco/opencode/releases/tag/v1.18.20 (OpenCode / SST).
- In every OpenCode subagent tool-call handler, if the call fails, read the surfaced resumable task_id and resume that same task_id; do not spawn a replacement task and do not treat an empty result as success.
- For unattended
opencode runjobs that launch subagents, keep the run attached so permission requests triggered by those subagents are answered in-process instead of aborting or hanging the session. - On Cerebras-backed OpenCode sessions, set max_completion_tokens as the only output limit and delete any extra application-level output cap stacked on top of it.
- Remove custom retry loops for finish_reason: network_error, the network-error/network_error variants, and xAI capacity or temporary-unavailability stream errors; v1.18.20 already retries those.
Config surfaces this release may change
- subagent definitions — check your repo before applying
- permission rules — check your repo before applying
After you finish
Do not report this as applied to DevAgentRadar. You cannot write the visitor's loop.
Tell the human: open https://devagentradar.com/proposals/opencode-v1-18-20-resume-failed-opencode-subagent-work-from-the-surfaced and mark Applied, Skipped, or Failed. Proposal id: faedb53a-a20a-43ef-b062-8e004a856ba3
Your job
- Restate the change in one sentence.
- Propose a minimal plan for my repo (or a throwaway pilot).
- Implement only what I approve; prefer small diffs and tests.
- Call out risks (permissions, breaking APIs, cost).
Start by confirming you understood the proposal.
Your loop
This browser · no sign-in · not shared as “you”After you run the prompt
Only you can mark this. Agents cannot write your loop.
Your decision stays on this device. A public tally appears after a few votes.