Skip to content

[FEATURE]: Make session processor retries configurable #48298

Closed as not planned
Closed as not planned

Description

@KayIter

Feature hasn't been suggested before

  • I searched existing issues for configurable session/processor retries.

Describe the enhancement

Please make the session processor retry limit configurable, including a supported value of zero.

In OpenCode 1.18.30, packages/opencode/src/session/retry.ts fixes RETRY_MAX_RETRIES at 5. This retry layer is independent of setting provider/AI SDK retries to zero. For coding-agent workloads, a turn may have side effects, so an implicit processor replay after a transport failure can duplicate provider requests and makes strict no-replay operation impossible.

A config option or environment variable would be sufficient. The current default can remain unchanged for compatibility, while operators that require at-most-one provider attempt can select zero. Exposing the current attempt in structured diagnostics would also help clients distinguish the original failure from retry exhaustion.

Tested with OpenCode 1.18.30 on Linux x86_64 using an OpenAI-compatible provider and injected retryable transport failures.

Activity

  1. github-actions commented on Sep 10, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Please review these and comment on one of the existing issues if your request overlaps, or clarify how this differs if you believe it is distinct.

  2. KayIter commented on Sep 10, 2026

    @KayIter
    Author

    Closing this as a duplicate of #43596. I added the distinct maxRetries: 0 / side-effecting coding-agent use case to that issue so the requirement is tracked in one place.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions