---
type: email
from: Conner Paine <notifications@github.com>
subject: [openai/openai-agents-python] Add `timeout` feature for agent runs

 (Issue #1425)
received: 2026-03-05 10:01:42
date_header: Mon, 11 Aug 2025 13:08:06 -0700
priority: normal
status: awaiting_approval
uid: 27204
---

## Email Content

**From:** Conner Paine <notifications@github.com>
**Subject:** [openai/openai-agents-python] Add `timeout` feature for agent runs

 (Issue #1425)
**Date:** Mon, 11 Aug 2025 13:08:06 -0700

### Body (preview)

conpaine109 created an issue (openai/openai-agents-python#1425)



Have you read the docs? [Agents SDK docs](https://openai.github.io/openai-agents-python/) – *YES*



Have you searched for related issues? Others may have had similar requests – *YES*



Describe the feature

It would be helpful to have a `max_time` parameter for the *run()* and *run_streamed()* methods, allowing users to automatically terminate runs that exceed a specified duration.



While this functionality is straightforward for users to implement manually, it would be convenient to have it built into the SDK.



Proposed behavior:



- If `run_time` > `max_time`, raise a **TimeoutError** (some relevant err).



- For streaming runs: `max_time` counts seconds before the first token is received.



- For runs: `max_time` counts seconds before the `RunResult` is returned.



I've noticed over the past several days that runs have generally been taking longer, and I had to implement my own timeout logic. A built-in option would be clutch! Just some thoughts...



-- 

Reply to this email directly or view it on GitHub:

https://github.com/openai/openai-agents-python/issues/1425

You are receiving this because you are subscribed to this thread.



Message ID: <openai/openai-agents-python/issues/1425@github.com>

---

## Suggested Actions
- [ ] Reply
- [ ] Archive
- [ ] Escalate
