Skip to content

fix(opencode): retry empty unknown responses - #40531

Open
opencode-agent[bot] wants to merge 2 commits into
devfrom
retry-empty-response
Open

fix(opencode): retry empty unknown responses#40531
opencode-agent[bot] wants to merge 2 commits into
devfrom
retry-empty-response

Conversation

@opencode-agent

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

Copy link
Copy Markdown
Contributor

Summary

  • detect provider attempts that finish with an unknown reason without producing text, reasoning, or tool calls
  • route those attempts through the existing session retry policy and status updates
  • retry the same request instead of silently completing an empty assistant turn
  • preserve prior step output while recording the empty attempt and recovered response

Testing

  • bun test test/session/processor-effect.test.ts (16 passed)
  • bun test test/session/retry.test.ts (33 passed)
  • targeted test/cli/run/run-process.test.ts empty-response retry cases (2 passed)
  • bun x prettier --check packages/opencode/src/session/processor.ts packages/opencode/src/session/retry.ts packages/opencode/test/session/processor-effect.test.ts packages/opencode/test/cli/run/run-process.test.ts
  • CI typecheck passed

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant