Skip to content

fix(opencode): discard a failed attempt's output before retrying the stream - #135

Open
kvnloo wants to merge 1 commit into
devfrom
tip/51548-discard-failed-attempt-output
Open

kvnloo wants to merge 1 commit into
devfrom
tip/51548-discard-failed-attempt-output

Conversation

@kvnloo

@kvnloo kvnloo commented Sep 27, 2026

Copy link
Copy Markdown
Owner

Tip leaf (fork-only) — CLEAN

Mirrors upstream origin anomalyco#51548 onto this fork for diversify evidence. Not an upstream promote.

What: Discard a failed stream attempt's output before retry so poisoned text/reasoning/tools are not retained across retries.

Branch: tip/51548-discard-failed-attempt-output
Fork commit: bafa1d4755b0
Origin tip SHA: 7d53258ff232
Tracks: issue #134

Proof (fail → pass → restore)

cd packages/opencode
bun test test/session/processor-effect.test.ts -t 'discards failed|does not retry a stream after executing|retries a pending tool|retains partial text on non-retryable|keeps parts of previously completed|retains the original snapshot|retries an empty unknown-finish|surfaces an error when an empty stream|accepts text even without a finish|accepts tool output even without'
# GREEN: 11 pass
# NEGATIVE (base product + tip tests): 8 fail / 3 pass
# RESTORE: 11 pass

github_writes_origin: 0 — fork only. Codex promote parked.

@kvnloo kvnloo added the grok bot Posted by Grok Bot OSS review dump label Sep 27, 2026
@github-actions

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

Copy link
Copy Markdown

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

kvnloo commented Sep 29, 2026

Copy link
Copy Markdown
Owner Author

READY_UPSTREAM

Rechecked before promotion:

GitHub App cannot write to anomalyco/opencode from this environment (403). Hermes/local-gh may post the evidence comment from this fork PR. Do not open a duplicate PR.

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

Labels

grok bot Posted by Grok Bot OSS review dump needs:issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant