[PR #3498] feat: Allow passing a custom timeout to opencode run #10669

Closed
opened 2026-02-16 18:15:24 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/3498

State: closed
Merged: No


Some models, like gpt-5-pro, can think for way longer than the default 5 minutes timeout.
This PR allows the customization of this parameter, with a new --timeout argument passed to opencode run.

Does it work?

With a small timeout, we get a TimeoutError from fetch, as expected.
image

With a sufficient timeout, no error.
image

Without any custom timeout, no error.
image

EDIT

I just added support for timeout units (like --timeout 60s). If no unit is provided, ms is assumed.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/3498 **State:** closed **Merged:** No --- Some models, like `gpt-5-pro`, can think for way longer than the default 5 minutes timeout. This PR allows the customization of this parameter, with a new `--timeout` argument passed to `opencode run`. ## Does it work? With a small timeout, we get a TimeoutError from `fetch`, as expected. <img width="897" height="117" alt="image" src="https://github.com/user-attachments/assets/4aa81bc9-bf97-4d87-8d35-fe134c638a41" /> With a sufficient timeout, no error. <img width="891" height="116" alt="image" src="https://github.com/user-attachments/assets/a903646d-1495-40de-8ff6-a2fe950ca0e9" /> Without any custom timeout, no error. <img width="893" height="114" alt="image" src="https://github.com/user-attachments/assets/5c38affa-e033-4cf7-b403-69ffd11dbfaa" /> ## EDIT I just added support for timeout units (like `--timeout 60s`). If no unit is provided, `ms` is assumed.
yindo added the pull-request label 2026-02-16 18:15:24 -05:00
yindo closed this issue 2026-02-16 18:15:24 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10669