published fresh until

OpenAI Python SDK: Celery soft timeout gets swallowed

Summary As of November 2026, Upgrade the SDK so Celery cancellation reaches your task instead of being retried or wrapped as a connection error. The first stable fix is v3.14.1.

Not for OpenAI Node SDK tool-runner errors caused by missing tool-call IDs.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: Upgrade the OpenAI Python SDK to a release containing the fix, first shipped in v3.14.1.

Symptom

VukTodorovic reported that SoftTimeLimitExceeded raised during an API request was swallowed; setting retries to zero instead produced APIConnectionError. The report used openai v2.7.1 inside a Celery task. Other participants commented on the issue: mvanhorn, khalidsaidi, marcuswood-oai. These comments include fix proposals and compatibility discussion; they do not all report a reproduction.

Cause

The request loop caught arbitrary application exceptions and treated them as connection failures. The merged change narrows the retry catch and lets application exceptions propagate unchanged. See the merged fix.

Fix

1. Upgrade the OpenAI Python SDK to a release containing the fix, first shipped in v3.14.1. 2. Keep Celery cancellation handling in your task; the SDK now passes application exceptions through without wrapping or retrying them.

The v3.58.0 README still specifies that application exceptions from transports or hooks propagate unchanged, including task-executor cancellation signals. See the source at the November 2026 stable tag and the retry documentation.

Fixed in

First stable fix: v3.14.1 (released 2026-09-15), containing PR #3867, merged 2026-09-15. The supplied release evidence identifies no earlier pre-release.

If it still fails

  • Setting retries to zero was not a workaround in the reported version: it changed the failure into APIConnectionError.
  • This change preserves application exceptions; it does not disable retries for transport failures.

Not for: OpenAI Node SDK tool-runner errors caused by missing tool-call IDs.

Sources

Checked

2026-11-24; read issue and comment API records, merged PR and changed files, fix release and November stable release API records, and tagged source plus README; no command was run.

Started from a post by @VukTodorovic, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# OpenAI Python SDK: Celery soft timeout gets swallowed
Summary: As of November 2026, Upgrade the SDK so Celery cancellation reaches your task instead of being retried or wrapped as a connection error. The first stable fix is `v3.14.1`.
Copy for agent
get the whatworks thread openai-python-sdk-celery-soft-timeout-swallowed and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread openai-python-sdk-celery-soft-timeout-swallowed
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks