GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(opencode): surface resumable subagent errors by opencode-agent[bot] · Pull Request #43657 · anomalyco/opencode

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Issue for this PR

Not linked yet.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

A V1 subagent provider failure is stored on the child assistant message, but the task tool currently ignores that error and returns an empty successful result. The parent therefore sees the task as completed and loses the information needed to continue the child session.

This change turns a child assistant error into a task failure containing both the original provider message and the child task_id. The parent can distinguish failure from an empty completion and resume the same subagent session instead of repeating its work.

How did you verify your code works?

  • cd packages/opencode && bun test test/tool/task.test.ts (21 passed)
  • Added a regression test for an empty child response carrying a network error; it asserts that the task fails with the provider message and resumable task_id.
  • bun typecheck was attempted but did not complete within the host's five-minute execution window.

Screenshots / recordings

Not applicable; runtime behavior only.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Requested by: @rekram1-node (Aiden via Slack)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rekram1-node
fix(opencode): surface resumable subagent errors
0b40dff
@opencode-agent opencode-agent Bot assigned rekram1-node Aug 20, 2026
@github-actions github-actions Bot added the contributor label Aug 20, 2026
@rekram1-node
fix(opencode): narrow subagent error details
99be7b8
@rekram1-node
rekram1-node merged commit c313504 into dev Aug 21, 2026
9 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@rekram1-node
rekram1-node deleted the subagent-network-error branch August 21, 2026 02:57
@github-actions github-actions Bot mentioned this pull request Aug 24, 2026
Informe upstream (semanal) jaminsmoke/Jarvis#52
Open
This was referenced Aug 27, 2026
Task lifecycle: the tool misdescribes async work, results go missing, and stops leave work running #45480
Closed
fix(task): make async subagent tasks answer honestly, once, in order, and stop #45482
Closed
1056674754 added a commit to 1056674754/opencode that referenced this pull request Aug 31, 2026
@1056674754
chore: merge OpenCode v1.18.20-sscity
e0f1b97
Upstream v1.18.19 (2b72179) -> v1.18.20 (7248bc1), 23 commits.

Functional changes:
- fix(opencode): surface resumable subagent errors (anomalyco#43657)
- fix(opencode): answer subagent permissions in run (anomalyco#43675)
- fix(opencode): preserve Cerebras completion limit (anomalyco#43736)
- fix(opencode): retry xAI capacity stream errors (anomalyco#43640)
- fix(opencode): retry network error variants (anomalyco#43806)
- fix(opencode): retry raw network finish errors (anomalyco#43813)
- fix(opencode): surface subagent tool errors (anomalyco#43821)
- test(opencode): remove flaky subagent test (anomalyco#43819)
- feat(go): add Ox Alpha to usage graph (anomalyco#43809); docs + i18n updates

Conflicts resolved: 29 package.json version bumps (rebranded 1.18.20-sscity),
bun.lock (took upstream, rebranded workspace entries via bun install).
session/llm/ai-sdk.ts finish-step reconciled by hand: upstream
rawFinishReason network_error check runs first (provider-declared failure,
specific message), then the fork empty-finish retry heuristic inside the
generator; duplicate ProviderError import from both sides deduplicated.
retry.ts auto-merged: upstream network[-_\s]error and at-capacity patterns
adopted; fork content-policy maxAttempts cap and 5xx-always-retryable logic
untouched. task.ts, cerebras.ts, plugin/index.ts, and run.ts auto-merged
cleanly: upstream resumable subagent task_id error surfacing, subagent
permission session tracking, and Cerebras maxOutputTokens guard adopted
alongside. Tests from both sides kept: upstream network_error finish-reason
processor/llm tests plus fork overload-retry, empty-stream, content-policy,
and single-flight regressions all pass.
lihaokun pushed a commit to lihaokun/opencode that referenced this pull request Sep 3, 2026
@yixiao5428
chore: sync upstream dev (#24)
cd10000
Merge upstream/dev at 10765ff into the fork, preserving the local
incomplete-stream recovery, context-overflow bounding, message ID rollover
chronology, reasoning fragment coalescing, periodic doom-loop detection and
resumable task-error contracts.

Upstream: 433 commits (41 feat, 165 fix), 882 files, +101191/-12002. 23
conflicts resolved; decisions recorded in
docs/devlog/2026-08-30-upstream-dev-sync.md.

Conflicts where both sides had independently implemented the same fix:

- message-v2 latest(): kept the fork's compareChronology; dropped upstream's
  equivalent isAfter helper (anomalyco#40990).
- prompt loop: combined upstream's direct-parent check with the fork's
  chronology comparison into lastAssistantBelongsToLatestTurn.
- revert boundaries: kept the fork's persisted messageTimeCreated and
  partTimeCreated, which still resolve after the boundary message or part is
  deleted, over upstream's array-index approach (anomalyco#40991).
- subagent errors: folded upstream's resumable "task_id" text (anomalyco#43657, anomalyco#43821)
  into the fork's size-bounded, escaped markup envelope.
- truncate cleanup: both sides moved to file mtime (anomalyco#40987); kept upstream's
  explicit rollover-ID test alongside the fork's.

Upstream behaviour inherited that touches fork contracts:

- anomalyco#43892 continues the loop on an unknown finish reason instead of exiting.
  Reachable without an incomplete-stream error when a provider returns a
  vendor-specific finish_reason; pinned by a regression in
  test/session/prompt.test.ts. The loop has no bound for this case.
- Compaction preserves up to 15k recent tokens, was 8k, which makes the fork's
  pre-transport willOverflow estimate fire more often.
- Retry gained jitter, a five-attempt cap and a much broader retryable-message
  match. The fork's incomplete-stream messages deliberately do not match it, so
  bounded recovery keeps exclusive control of that path.

Legacy revert boundaries are no longer hydrated in list APIs, to avoid an N+1
query. SessionRevert.cleanup re-fetches the single row when the persisted time
is absent.
rldona pushed a commit to plazoleta-dev/FlupCode that referenced this pull request Sep 24, 2026
@opencode-agent @rekram1-node
fix(opencode): surface resumable subagent errors (anomalyco#43657)
e0aa616
Co-authored-by: rekram1-node <[email protected]>
Ichinose-Kazuki pushed a commit to Ichinose-Kazuki/opencode that referenced this pull request Oct 7, 2026
@opencode-agent @rekram1-node
fix(opencode): surface resumable subagent errors (anomalyco#43657)
6465afa
Co-authored-by: rekram1-node <[email protected]>
Spark-Liang added a commit to Spark-Liang/opencode that referenced this pull request Oct 9, 2026
@Spark-Liang
fix(task): surface child errors with resumable task_id
91ce545
Backport anomalyco#43657 (c313504). Preserve the upstream error message checks and regression test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@rekram1-node rekram1-node

Labels

contributor

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@rekram1-node
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.