Skip to content
Proposals/Resume failed OpenCode subagent work from the su
proposalteamP4Worth a lookOpenCode

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

Previously, subagent failures could look like empty results and force a full rerun. This release returns a resumable task_id for failed subagent tool calls, surfaces those failures explicitly, and handles permission requests triggered by subagents during opencode run. It also retries finish_reason network_error plus network-error/network_error variants and xAI capacity/temporary unavailability stream errors, and preserves Cerebras max_completion_tokens without an extra output cap. Teams should treat subagent failures as resumable work units, wire permissions so non-interactive runs do not stall, and lean on the broader retry behavior for flaky providers rather than manual restarts.

Proposed actions

  1. Upgrade OpenCode to v1.18.20, then rerun a known-failing multi-agent flow and capture any failed subagent tool call’s task_id from the surfaced error instead of treating the result as empty.
  2. When a subagent tool call fails, resume with that task_id (same session/run context) rather than starting a new opencode run from scratch; only open a fresh run if no task_id is returned.
  3. For headless automation, switch permission-sensitive multi-agent jobs to `opencode run` and pre-approve or answer the permission prompts subagents now raise during the run so the parent does not hang.
  4. If you use Cerebras, set max_completion_tokens to your intended output budget and remove any workaround that lowered it to compensate for a double output cap.
  5. On xAI or flaky-network providers, keep the same prompt/model settings and rely on the new retries for finish_reason network_error, network-error/network_error, and xAI capacity/temporary unavailability—log residual failures only after those retries exhaust.

Agent prompt

Paste into your agent or query via MCP (`get_agent_prompt`) — free, no extra AI cost

Paste into Claude Code / CLAUDE.md task

# DevAgentRadar → Claude Code

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
Previously, subagent failures could look like empty results and force a full rerun. This release returns a resumable task_id for failed subagent tool calls, surfaces those failures explicitly, and handles permission requests triggered by subagents during opencode run. It also retries finish_reason network_error plus network-error/network_error variants and xAI capacity/temporary unavailability stream errors, and preserves Cerebras max_completion_tokens without an extra output cap. Teams should treat subagent failures as resumable work units, wire permissions so non-interactive runs do not stall, and lean on the broader retry behavior for flaky providers rather than manual restarts.

## Suggested actions
1. Upgrade OpenCode to v1.18.20, then rerun a known-failing multi-agent flow and capture any failed subagent tool call’s task_id from the surfaced error instead of treating the result as empty.
2. When a subagent tool call fails, resume with that task_id (same session/run context) rather than starting a new opencode run from scratch; only open a fresh run if no task_id is returned.
3. For headless automation, switch permission-sensitive multi-agent jobs to `opencode run` and pre-approve or answer the permission prompts subagents now raise during the run so the parent does not hang.
4. If you use Cerebras, set max_completion_tokens to your intended output budget and remove any workaround that lowered it to compensate for a double output cap.
5. On xAI or flaky-network providers, keep the same prompt/model settings and rely on the new retries for finish_reason network_error, network-error/network_error, and xAI capacity/temporary unavailability—log residual failures only after those retries exhaust.

## Config surfaces this release may change
- subagent definitions — check your repo before applying
- permission rules — check your repo before applying


## Your job
1. Restate the change in one sentence.
2. Propose a minimal plan for my repo (or a throwaway pilot).
3. Implement only what I approve; prefer small diffs and tests.
4. 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”

Your decision stays on this device. A public tally appears after a few votes.

Originating release signal

OpenCodev1.18.20Aug 21, 2026

v1.18.20

Surface failed subagent tool calls with a resumable `task_id`. · Retry provider responses that end with `finish_reason: network_error`. · Retry more network error variants, including `network-error` and `network_error`. · Surface resumable subagent failures instead of returning an empty result. · Preserve Cerebras `max_completion_tokens` without applying an extra output cap. · Answer permission requests triggered by subagents during `opencode run`. · Retry xAI capacity and temporary unavailability stream errors.

Verified excerpt — the source's own words
## Core
### Bugfixes
- Surface failed subagent tool calls with a resumable `task_id`.
- Retry provider responses that end with `finish_reason: network_error`.
- Retry more network error variants, including `network-error` and `network_error`.
- Surface resumable subagent failures instead of returning an empty result.
- Preserve Cerebras `max_completion_tokens` without applying an extra output cap.
- Answer permission requests triggered by subagents during `opencode run`.
- Retry xAI capacity and temporary unavailability stream errors.
Primary source ↗