René's URL Explorer Experiment


Title: [BUG] Race Condition: Resume request fails with "Paused execution not found" during pause persistence · Issue #3081 · simstudioai/sim · GitHub

Open Graph Title: [BUG] Race Condition: Resume request fails with "Paused execution not found" during pause persistence · Issue #3081 · simstudioai/sim

X Title: [BUG] Race Condition: Resume request fails with "Paused execution not found" during pause persistence · Issue #3081 · simstudioai/sim

Description: Problem Description There is a race condition between the persistence of a paused workflow execution and the processing of incoming resume requests. If a resume request (e.g., via API) arrives immediately after a workflow pauses but befo...

Open Graph Description: Problem Description There is a race condition between the persistence of a paused workflow execution and the processing of incoming resume requests. If a resume request (e.g., via API) arrives imme...

X Description: Problem Description There is a race condition between the persistence of a paused workflow execution and the processing of incoming resume requests. If a resume request (e.g., via API) arrives imme...

Opengraph URL: https://github.com/simstudioai/sim/issues/3081

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG] Race Condition: Resume request fails with \"Paused execution not found\" during pause persistence","articleBody":"## Problem Description\nThere is a race condition between the persistence of a paused workflow execution and the processing of incoming resume requests. If a resume request (e.g., via API) arrives immediately after a workflow pauses but before the `pausedExecutions` record is fully committed to the database, the resume attempt fails with a \"Paused execution not found\" error.\n\nThis is critical for high-throughput automation where external systems may attempt to resume a workflow milliseconds after it enters a paused state.\n\n## Current Behavior\n1. **Workflow Execution:** A workflow reaches a pause point.\n2. **Persistence Start:** The system calls `PauseResumeManager.persistPauseResult` to save the state.\n3. **Race Window:** During the DB write operation, an external API calls the resume endpoint (`/api/resume/...`).\n4. **Resume Check:** The resume API calls [enqueueOrStartResume](cci:1://file:///home/h30s/Project/sim/apps/sim/lib/workflows/executor/human-in-the-loop-manager.ts:162:2-279:3), which attempts to fetch the `pausedExecutions` record.\n5. **Failure:** Since the record is not yet visible/committed, the fetch returns null, and the API throws `Paused execution not found`.\n6. **Persistence End:** [persistPauseResult](cci:1://file:///home/h30s/Project/sim/apps/sim/lib/workflows/executor/human-in-the-loop-manager.ts:103:2-160:3) completes, but the valid resume request has already been rejected.\n\n## Affected Files\n- [apps/sim/background/workflow-execution.ts](cci:7://file:///home/h30s/Project/sim/apps/sim/background/workflow-execution.ts:0:0-0:0)\n- [apps/sim/lib/workflows/executor/human-in-the-loop-manager.ts](cci:7://file:///home/h30s/Project/sim/apps/sim/lib/workflows/executor/human-in-the-loop-manager.ts:0:0-0:0)\n- [apps/sim/app/api/resume/[workflowId]/[executionId]/[contextId]/route.ts](cci:7://file:///home/h30s/Project/sim/apps/sim/app/api/resume/%5BworkflowId%5D/%5BexecutionId%5D/%5BcontextId%5D/route.ts:0:0-0:0)\n\n## Recommended Fix\nWrap the pause persistence and the subsequent queue processing in a database transaction. This ensures that the paused state is atomically visible to any concurrent resume requests, or properly locks the row so the resume request waits until the transaction completes.\n\n**Proposed Implementation:**\nModify [persistPauseResult](cci:1://file:///home/h30s/Project/sim/apps/sim/lib/workflows/executor/human-in-the-loop-manager.ts:103:2-160:3) to use a transaction that includes both the insertion of the paused execution and the checking of the resume queue.","author":{"url":"https://github.com/h30s","@type":"Person","name":"h30s"},"datePublished":"2026-01-30T19:00:04Z","url":"https://github.com/simstudioai/sim/issues/3081"}

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/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:f365bbb7-312d-d314-8a80-8abaa6d95604
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB862:9464C:152DFF8:1CE201E:6AFB77A3
html-safe-noncef2b2e2e228395ecbb72a674361d330930f99dc39c02feffb4bbcbb49d0076251
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCODYyOjk0NjRDOjE1MkRGRjg6MUNFMjAxRTo2QUZCNzdBMyIsInZpc2l0b3JfaWQiOiI0MzkwMTYxNDE2Nzk5ODc3MDI3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac0d54395290fa1788d93d4b3285bc1909d2654486853b687094f6ccbd6aa3dca7
hovercard-subject-tagissue:3876976483
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/simstudioai/sim/3081/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a7947c99b46440d76d501a1cabb4263d78eee50d8a931ea56d35260b1c9ab696/simstudioai/sim/issues/3081
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a7947c99b46440d76d501a1cabb4263d78eee50d8a931ea56d35260b1c9ab696/simstudioai/sim/issues/3081
og:image:altProblem Description There is a race condition between the persistence of a paused workflow execution and the processing of incoming resume requests. If a resume request (e.g., via API) arrives imme...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameh30s
hostnamegithub.com
expected-hostnamegithub.com
None0e29e7974fdda2feeaf5c891efd4b23b0734b23480232b62c7bdef13f40b5b48
turbo-cache-controlno-preview
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2e8872b770cc4d5d0cc1f2026afab747a268e2ce
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/simstudioai/sim/issues/3081#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fissues%2F3081
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%2Fissues%2F3081
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/issues/3081
Reloadhttps://github.com/simstudioai/sim/issues/3081
Reloadhttps://github.com/simstudioai/sim/issues/3081
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests201 (201)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
https://github.com/simstudioai/sim
New issuehttps://github.com/login?return_to=https://github.com/simstudioai/sim/issues/3081
New issuehttps://github.com/login?return_to=https://github.com/simstudioai/sim/issues/3081
#3577https://github.com/simstudioai/sim/pull/3577
#3291https://github.com/simstudioai/sim/pull/3291
[BUG] Race Condition: Resume request fails with "Paused execution not found" during pause persistencehttps://github.com/simstudioai/sim/issues/3081#top
#3577https://github.com/simstudioai/sim/pull/3577
#3291https://github.com/simstudioai/sim/pull/3291
bugSomething isn't workinghttps://github.com/simstudioai/sim/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com/h30s
h30shttps://github.com/h30s
on Jan 30, 2026https://github.com/simstudioai/sim/issues/3081#issue-3876976483
h30shttps://github.com/h30s
bugSomething isn't workinghttps://github.com/simstudioai/sim/issues?q=state%3Aopen%20label%3A%22bug%22
on Jan 30, 2026https://github.com/simstudioai/sim/issues/3081#event-22415256380
https://github.com/h30s
h30shttps://github.com/h30s
on Jan 30, 2026https://github.com/simstudioai/sim/issues/3081#issuecomment-3825201602
@waleedlatif1https://github.com/waleedlatif1
https://github.com/waleedlatif1
waleedlatif1https://github.com/waleedlatif1
on Jan 30, 2026https://github.com/simstudioai/sim/issues/3081#issuecomment-3825312284
@h30shttps://github.com/h30s
@Sg312https://github.com/Sg312
https://github.com/h30s
h30shttps://github.com/h30s
on Feb 2, 2026https://github.com/simstudioai/sim/issues/3081#issuecomment-3836262334
@h30shttps://github.com/h30s
@Sg312https://github.com/Sg312
@waleedlatif1https://github.com/waleedlatif1
@Sg312https://github.com/Sg312
#3088https://github.com/simstudioai/sim/pull/3088
jayy-77https://github.com/jayy-77
on Feb 21, 2026https://github.com/simstudioai/sim/issues/3081#event-22973510746
fix: retry resume during pause persistencehttps://github.com/jayy-77/sim/commit/c11075c9342e6d359debe85bee31d516ddc3a5c9
https://docs.github.com/articles/closing-issues-via-commit-messages
c11075chttps://github.com/jayy-77/sim/commit/c11075c9342e6d359debe85bee31d516ddc3a5c9
fix(executor): harden resume lookup retrieshttps://github.com/jayy-77/sim/commit/ded1da438791d43ece647bf67f6f65ac207dd73f
https://docs.github.com/articles/closing-issues-via-commit-messages
ded1da4https://github.com/jayy-77/sim/commit/ded1da438791d43ece647bf67f6f65ac207dd73f
MaxwellCalkinhttps://github.com/MaxwellCalkin
on Mar 9, 2026https://github.com/simstudioai/sim/issues/3081#event-23387055061
fix: resolve pause-resume race condition with transaction + retry (si…https://github.com/MaxwellCalkin/sim/commit/1e4b3e09f3287f0af4c25a925c11cf955433db20
si…https://github.com/simstudioai/sim/issues/3081
1e4b3e0https://github.com/MaxwellCalkin/sim/commit/1e4b3e09f3287f0af4c25a925c11cf955433db20
guoyangzhenhttps://github.com/guoyangzhen
on Mar 14, 2026https://github.com/simstudioai/sim/issues/3081#event-23571406313
fix: add retry for resume race condition (simstudioai#3081)https://github.com/guoyangzhen/sim/commit/278daf650f980375350858eedcbfd8d309c0ecaa
simstudioai#3081https://github.com/simstudioai/sim/issues/3081
278daf6https://github.com/guoyangzhen/sim/commit/278daf650f980375350858eedcbfd8d309c0ecaa
https://github.com/icecrasher321
icecrasher321https://github.com/icecrasher321
on Apr 10, 2026https://github.com/simstudioai/sim/issues/3081#issuecomment-4221724778
#4058https://github.com/simstudioai/sim/pull/4058
icecrasher321https://github.com/icecrasher321
completedhttps://github.com/simstudioai/sim/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Apr 10, 2026https://github.com/simstudioai/sim/issues/3081#event-24370043585
Sign up for freehttps://github.com/signup?return_to=https://github.com/simstudioai/sim/issues/3081
Sign in to commenthttps://github.com/login?return_to=https://github.com/simstudioai/sim/issues/3081
bugSomething isn't workinghttps://github.com/simstudioai/sim/issues?q=state%3Aopen%20label%3A%22bug%22
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.