Skip to content

fix(session): add fallback retry handling and harden pre-push bun path#26192

Closed
C24-AK wants to merge 1 commit into
anomalyco:devfrom
C24-AK:fix/session-fallback-retry-status
Closed

fix(session): add fallback retry handling and harden pre-push bun path#26192
C24-AK wants to merge 1 commit into
anomalyco:devfrom
C24-AK:fix/session-fallback-retry-status

Conversation

@C24-AK

@C24-AK C24-AK commented May 7, 2026

Copy link
Copy Markdown

Issue for this PR

Not sure but
Closes # #25150

Type of change

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

What does this PR do?

My problem was:
When using Model A which had no more limits I wanted opencode to use the Model B as fallback.
This PR fixes the session fallback behavior so Agents can remain on Model A while reliably falling back to Model B when needed. I removed noisy retry status messaging by suppressing repeated rate-limit retry status updates per session after the first occurrence. (Done by config change experimental.suppress_retry_status_message => true)
Furthermore Ipdates the pre-push hook to resolve Bun in our restricted shell environments, preventing turbo package-manager resolution failures during push checks.

If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!

How did you verify your code works?

  • Ran bun typecheck
  • Tested:
    bun test test/session/session.test.ts test/server/session-actions.test.ts
  • Built compiled binary with bun run build --single --skip-embed-web-ui
  • Verified compiled runtime fallback behavior and output on repeated runs.

Screenshots / recordings

I dont have recordings
If this is a UI change, please include a screenshot or recording.

Checklist

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

If you do not follow this template your PR will be automatically rejected.

@github-actions github-actions Bot added needs:issue needs:compliance This means the issue will auto-close after 2 hours. labels May 7, 2026
@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

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.

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on my search, I found several related PRs that address similar concerns around retry handling and fallback mechanisms, but no exact duplicates. Here are the most relevant related PRs:

Closely Related (retry/fallback functionality):

Related (pre-push hook/bun path):

These PRs address related concerns in the retry and fallback space, but PR #26192 appears to be a distinct implementation combining session fallback behavior with pre-push hook hardening.

@C24-AK C24-AK force-pushed the fix/session-fallback-retry-status branch from 1ef713f to 5cb22ca Compare May 7, 2026 13:56
@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label May 7, 2026
@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@j3k0

j3k0 commented May 17, 2026

Copy link
Copy Markdown

Sibling PR — #26292 also implements fallback with cooldown and addresses the model attribution gap you identified. Comparison table in the PR description. Would be great to coordinate.

@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

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.

2 participants