René's URL Explorer Experiment


Title: fix(providers): name the failing phase of a stalled OpenAI call, and reject a failed generation by waleedlatif1 · Pull Request #6283 · simstudioai/sim · GitHub

Open Graph Title: fix(providers): name the failing phase of a stalled OpenAI call, and reject a failed generation by waleedlatif1 · Pull Request #6283 · simstudioai/sim

X Title: fix(providers): name the failing phase of a stalled OpenAI call, and reject a failed generation by waleedlatif1 · Pull Request #6283 · simstudioai/sim

Description: Summary An agent block hung ~4.5 min with an empty trace, surfacing only the runtime's TimeoutError: The operation timed out. Root cause: the model repeated one tool call until it consumed the full 128,000-token output budget. /v1/responses withholds its 200 until generation finishes, so the client waited — bounded only by an undocumented runtime socket deadline — and gave up before the response existed. Confirmed against OpenAI's stored response (status: incomplete, reason: max_output_tokens). Name the phase a transport failure died in — awaiting-response-headers vs reading-response-body — with status, ttfb, content-length and x-request-id. Precedent: undici splits these into UND_ERR_HEADERS_TIMEOUT / UND_ERR_BODY_TIMEOUT; the OpenAI SDK captures x-request-id. It rides the error message because that reaches the trace span, which survives when a task stops shipping logs. Carry the cause through ProviderError so a transport timeout still classifies after wrapping overwrites name. Reject a 200 reporting a failed or unusable generation instead of returning empty content with billed tokens, and stop truncated tool calls executing. Matches streamResponsesTurn (already did this) and @ai-sdk/openai (throws on the same condition). Bound non-JSON error bodies so a gateway error page can't become the block error. Deliberately excluded: a response-body deadline (the observed failure is in the headers phase; body transfer measured at ~1 ms) and status-based retries (worth doing, unrelated, separable). Type of Change Bug fix Testing Tested manually against the live API plus 14 new unit tests. Root cause confirmed from OpenAI's stored responses for the actual incident — all three turns, the third at exactly 128,000 output tokens. Verified live that /v1/responses withholds its 200 until generation completes (14,545 ms to headers, 1 ms of body), which is why only the headers phase matters here. Replayed real captured /v1/responses payloads (completed, incomplete/max_output_tokens, tool-call) through the provider — none rejected by the new guard. Every new test verified able to fail by breaking the implementation first. Full suite green; boundary audit, typecheck and lint clean. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Open Graph Description: Summary An agent block hung ~4.5 min with an empty trace, surfacing only the runtime's TimeoutError: The operation timed out. Root cause: the model repeated one tool call until it consumed the...

X Description: Summary An agent block hung ~4.5 min with an empty trace, surfacing only the runtime's TimeoutError: The operation timed out. Root cause: the model repeated one tool call until it consumed...

Opengraph URL: https://github.com/simstudioai/sim/pull/6283

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:8b0c0afe-8d51-3d43-b3c9-f65fe95c0838
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9FCC:11E6AB:254B02:35232A:6AFB529A
html-safe-nonce75106c929c6047e834f693106d570ddba0573530fee6b5ec6492fd0770bab6db
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RkNDOjExRTZBQjoyNTRCMDI6MzUyMzJBOjZBRkI1MjlBIiwidmlzaXRvcl9pZCI6IjgxMjQzOTY5MjUzMDMzNDU4MTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac36e9ce126cced501e11415e53ad309a1979c735f618d21eba94789c5e6bb0fbf
hovercard-subject-tagpull_request:4209449557
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6283/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altSummary An agent block hung ~4.5 min with an empty trace, surfacing only the runtime's TimeoutError: The operation timed out. Root cause: the model repeated one tool call until it consumed the...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7122bb414b542dba14d71a3f0b9f6fd2abce715b9f5912d082800563e6c806d1
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecbf66c024bb6d10e6955baa7413c54cf13a201bb
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/6283/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6283%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6283%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/6283/files
Reloadhttps://github.com/simstudioai/sim/pull/6283/files
Reloadhttps://github.com/simstudioai/sim/pull/6283/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests197 (197)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
fix/openai-provider-transport-diagnostics-v2https://github.com/simstudioai/sim/tree/fix/openai-provider-transport-diagnostics-v2
Conversation 14 https://github.com/simstudioai/sim/pull/6283
Commits 5 https://github.com/simstudioai/sim/pull/6283/commits
Checks 30 https://github.com/simstudioai/sim/pull/6283/checks
Files changed https://github.com/simstudioai/sim/pull/6283/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6283/files
fix(providers): name the failing phase of a stalled OpenAI call, and reject a failed generation https://github.com/simstudioai/sim/pull/6283/files#top
Show all changes 5 commits https://github.com/simstudioai/sim/pull/6283/files
78a4a23 fix(providers): name the failing phase of a stalled OpenAI call, and … waleedlatif1 Aug 5, 2026 https://github.com/simstudioai/sim/pull/6283/commits/78a4a2390a1b046852fc8c8abe84f75e3269cbcc
0bdba86 test(providers): pin that a structured provider error survives the er… waleedlatif1 Aug 5, 2026 https://github.com/simstudioai/sim/pull/6283/commits/0bdba86b952e88c8fb491aa9e1cd5d0cb436b283
d0dce45 chore(providers): trim comments to the non-obvious why waleedlatif1 Aug 5, 2026 https://github.com/simstudioai/sim/pull/6283/commits/d0dce456c1d51ac3ebcdc707243ea9617127a92e
0655825 fix(providers): let a deadline while reading an error body propagate waleedlatif1 Aug 5, 2026 https://github.com/simstudioai/sim/pull/6283/commits/06558256ee4d5b869a5e2eb1d3cd10e2ce596e32
678384b fix(providers): name the body phase when an error body read fails waleedlatif1 Aug 5, 2026 https://github.com/simstudioai/sim/pull/6283/commits/678384b4cb0af69b08fe1d2581ce0d3eed20c4ed
Clear filters https://github.com/simstudioai/sim/pull/6283/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6283/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6283/files
sim-ui-copy.md https://github.com/simstudioai/sim/pull/6283/files#diff-146260036877543180b1db89a98dbf6e96a13b8cdde9655ad1c9cdb8ce7eecc2
sim-ui-copy.mdc https://github.com/simstudioai/sim/pull/6283/files#diff-36f13a3985cf841b8acb4c7e37f2334b34b3b87f17d86ab9d4299f007fba0eda
agent-handler.test.ts https://github.com/simstudioai/sim/pull/6283/files#diff-5fa11051a09b82360438ce6a447b4eeb6faa66fa2f668ce615f81fb4ea906f07
agent-handler.ts https://github.com/simstudioai/sim/pull/6283/files#diff-99cbd7f57b71719ca1561f15e7aecdc9f7a969ae5ea3589aee9fa64b3c9bf614
core.response-status.test.ts https://github.com/simstudioai/sim/pull/6283/files#diff-4211177e4f6f3a323e32ea90cc00f6ba02ac698241d790d7be54f14505284f8c
core.transport-phase.test.ts https://github.com/simstudioai/sim/pull/6283/files#diff-e192cc660882535d4b8c8a6ab052a876b528c653db555f1d0f2eed40e07735c2
core.ts https://github.com/simstudioai/sim/pull/6283/files#diff-08a8d94bfd29c80408e6c52311d64c5f906c60d0e7a2144ec632f75d271e3492
types.ts https://github.com/simstudioai/sim/pull/6283/files#diff-173d679b23ede4297b7b374f41798fcf014b853f44c38f29fbbcbb8ee5ba39f5
.claude/rules/sim-ui-copy.mdhttps://github.com/simstudioai/sim/pull/6283/files#diff-146260036877543180b1db89a98dbf6e96a13b8cdde9655ad1c9cdb8ce7eecc2
View file https://github.com/simstudioai/sim/blob/678384b4cb0af69b08fe1d2581ce0d3eed20c4ed/.claude/rules/sim-ui-copy.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6283/{{ revealButtonHref }}
.cursor/rules/sim-ui-copy.mdchttps://github.com/simstudioai/sim/pull/6283/files#diff-36f13a3985cf841b8acb4c7e37f2334b34b3b87f17d86ab9d4299f007fba0eda
View file https://github.com/simstudioai/sim/blob/678384b4cb0af69b08fe1d2581ce0d3eed20c4ed/.cursor/rules/sim-ui-copy.mdc
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6283/{{ revealButtonHref }}
apps/sim/executor/handlers/agent/agent-handler.test.tshttps://github.com/simstudioai/sim/pull/6283/files#diff-5fa11051a09b82360438ce6a447b4eeb6faa66fa2f668ce615f81fb4ea906f07
View file https://github.com/simstudioai/sim/blob/678384b4cb0af69b08fe1d2581ce0d3eed20c4ed/apps/sim/executor/handlers/agent/agent-handler.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6283/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6283/files#diff-5fa11051a09b82360438ce6a447b4eeb6faa66fa2f668ce615f81fb4ea906f07
https://github.com/simstudioai/sim/pull/6283/files#diff-5fa11051a09b82360438ce6a447b4eeb6faa66fa2f668ce615f81fb4ea906f07
apps/sim/executor/handlers/agent/agent-handler.tshttps://github.com/simstudioai/sim/pull/6283/files#diff-99cbd7f57b71719ca1561f15e7aecdc9f7a969ae5ea3589aee9fa64b3c9bf614
View file https://github.com/simstudioai/sim/blob/678384b4cb0af69b08fe1d2581ce0d3eed20c4ed/apps/sim/executor/handlers/agent/agent-handler.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6283/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6283/files#diff-99cbd7f57b71719ca1561f15e7aecdc9f7a969ae5ea3589aee9fa64b3c9bf614
https://github.com/simstudioai/sim/pull/6283/files#diff-99cbd7f57b71719ca1561f15e7aecdc9f7a969ae5ea3589aee9fa64b3c9bf614
https://github.com/simstudioai/sim/pull/6283/files#diff-99cbd7f57b71719ca1561f15e7aecdc9f7a969ae5ea3589aee9fa64b3c9bf614
https://github.com/simstudioai/sim/pull/6283/files#diff-99cbd7f57b71719ca1561f15e7aecdc9f7a969ae5ea3589aee9fa64b3c9bf614
Please reload this pagehttps://github.com/simstudioai/sim/pull/6283/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6283/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.