anomalyco / anomalyco/opencode

Concurrent task delegation can fail persistence then return an empty success payload

Open
#44,859 1 comment 0 reactions 1 assignee View on GitHub

@nexxeln is already working on this.

Since Aug 25, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

Eight independent headless opencode run processes were launched concurrently in separate Git worktrees. Each primary session immediately delegated one coding unit through the task tool to the built-in general subagent.

One delegation failed before creating the subagent with only:

Implement issue failed General Agent
Error: Failed to execute statement

The primary retried. The retry reported successful completion but returned an empty result payload, requiring a third task call solely to recover the implementation report.

The worktree contained the subagent's edits, so task execution and result persistence diverged. The generic message discarded the SQLite classification, operation, retryability, and recovery data already available in the database layer.

Expected
  • Concurrent independent sessions serialize or retry bounded SQLite writes.
  • Persistence failures retain the classified SQLite cause and operation.
  • A task that completed edits cannot return success with an empty result payload.
  • Recovery can reattach to the existing subagent/session without creating another task unit.
  • Add a concurrent headless fixture with at least eight primary sessions delegating one subagent each.
OpenCode version

1.2.15

Operating system

macOS

AI Assistance

OpenAI GPT-5.6 Sol via OpenCode executed the concurrent task fanout, captured the persistence/result divergence, searched existing trackers, and drafted this report. Chris Huber directed the work and remains responsible.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.