René's URL Explorer Experiment


Title: fix(mothership): run same-workflow workflow tools in order instead of failing as busy by waleedlatif1 · Pull Request #8709 · simstudioai/sim · GitHub

Open Graph Title: fix(mothership): run same-workflow workflow tools in order instead of failing as busy by waleedlatif1 · Pull Request #8709 · simstudioai/sim

X Title: fix(mothership): run same-workflow workflow tools in order instead of failing as busy by waleedlatif1 · Pull Request #8709 · simstudioai/sim

Description: Summary When the agent issues several workflow run tools (run_block, run_workflow, run_from_block, run_workflow_until_block) against the same workflow in one step, the browser now runs them one after another, in the order they arrived. Before, every call after the first failed with WORKFLOW_EXECUTION_BUSY, and the agent had to spend a round re-issuing it. Why WORKFLOW_EXECUTION_BUSY is raised only in the browser (run-tool-execution.ts). The editor keeps one visible execution per workflow: the running flag, the current execution id, active blocks and the terminal pointer. Two runs of one workflow in a tab would overwrite each other, so the lock is right. Failing the queued calls is not: they are the agent's own fan-out, and nearly all of the busy results were this case, waiting behind a run tool from the same chat that finishes within seconds. Design One run slot per workflow. Each workflow has a single record, { owner, waiters }. The owner is either a run tool or an interrupted execution. acquireRunToolSlot, admitNextRunTool, releaseRunToolSlot and releaseInterruptedHold are the only functions that change it, and every run tool releases through releaseRunToolSlot. FIFO hand-off. A release passes the slot to the oldest waiter synchronously, so a call issued later can't take it first. Stop. stopRunToolExecutions removes stopped waiters and reports them cancelled without starting them. A call the server already took over is cancelled by the same Stop: the server's run uses the turn's abort signal. Chat recovery. bindRunToolToExecution treats a waiting call as owned by this tab, so recovery never starts it twice. It also re-sends a stored, undelivered completion even while another run owns the workflow, using the report's own execution id. Dropped streams. If a run's stream is interrupted while the server keeps executing it, that execution keeps the slot (owner interrupted), so a waiting call can't overwrite its terminal pointer. This is not run-tool ownership, so the editor's reconnect can still re-attach. The hold is released once two things are true: the server reports the execution settled (or 403/404), and no reconnect stream is still following it. Status is checked only while a call is actually waiting, never while a reconnect stream is open or the tab is hidden, and with backoff (max 15s). Once the server reports the execution settled, the browser stops asking and only waits for the reconnect to close. After repeated status errors it gives up and releases the hold. On release it clears any visible state that an abandoned reconnect left behind. Paused runs count as settled. A pause ends the stream and can last for days. What still returns BUSY: a run no run tool drives, such as the user's own run. That behaviour is unchanged. No queue timeout of its own: a call no browser claims within the server's pickup grace is run by the server. A late launch from the queue then gets the execute route's existing benign 409, so a workflow never runs twice and a long wait can't stall the agent. Tests run-tool-execution.test.ts covers: in-order runs; no skipping ahead during a hand-off; a stopped waiter is cancelled and never started; recovery doesn't double-start a waiter; a different workflow isn't held up; a dropped run holds the workflow until it settles; status is checked only while a call waits and no reconnect is open; an abandoned reconnect doesn't block the queue; a stored completion is re-sent while another run owns the workflow. Each regression test fails with its guard removed. apps/sim type-check, biome, check:audits, and the run-tool, editor-hook and home-hook suites pass. Verify In a browser chat, ask the agent to test several blocks of one workflow in parallel. The runs should appear one after another in the editor, every result should succeed with no busy errors, and Stop during the queue should cancel the remaining calls.

Open Graph Description: Summary When the agent issues several workflow run tools (run_block, run_workflow, run_from_block, run_workflow_until_block) against the same workflow in one step, the browser now runs them one aft...

X Description: Summary When the agent issues several workflow run tools (run_block, run_workflow, run_from_block, run_workflow_until_block) against the same workflow in one step, the browser now runs them one aft...

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

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:2dc06809-41b0-fb50-44ef-16bc9fe2fcb1
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA5AE:F482B:4F2091:6E9E07:6AFB5DB2
html-safe-nonceffdcf63a284fba095597120d7374b3ed00c6038942debc7ef91cb380ae4095e9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNUFFOkY0ODJCOjRGMjA5MTo2RTlFMDc6NkFGQjVEQjIiLCJ2aXNpdG9yX2lkIjoiNTI2MDI4NjI1MzM4MzkxOTg2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac0a9e96a061ddbefe0e311b6fd5b0188bb6403870857e1f886d0e47717716acd5
hovercard-subject-tagpull_request:4766282104
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/8709/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 When the agent issues several workflow run tools (run_block, run_workflow, run_from_block, run_workflow_until_block) against the same workflow in one step, the browser now runs them one aft...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneea33d13c96d0ff66bd8fa906b193d2213536b78cb06b0c50a4632c58b1418f94
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
release59ef97164c52cf59bd10558ddec9c4f482763988
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/8709/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F8709%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%2F8709%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/8709/files
Reloadhttps://github.com/simstudioai/sim/pull/8709/files
Reloadhttps://github.com/simstudioai/sim/pull/8709/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/serialize-workflow-tool-runshttps://github.com/simstudioai/sim/tree/fix/serialize-workflow-tool-runs
Conversation 41 https://github.com/simstudioai/sim/pull/8709
Commits 6 https://github.com/simstudioai/sim/pull/8709/commits
Checks 32 https://github.com/simstudioai/sim/pull/8709/checks
Files changed https://github.com/simstudioai/sim/pull/8709/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8709/files
fix(mothership): run same-workflow workflow tools in order instead of failing as busy https://github.com/simstudioai/sim/pull/8709/files#top
Show all changes 6 commits https://github.com/simstudioai/sim/pull/8709/files
7fc96da fix(mothership): run same-workflow workflow tools in order instead of… waleedlatif1 Oct 7, 2026 https://github.com/simstudioai/sim/pull/8709/commits/7fc96da084dc0c2d54080774c89114ee4a6bca44
c037c03 fix(mothership): keep a workflow for a run whose stream dropped until… waleedlatif1 Oct 7, 2026 https://github.com/simstudioai/sim/pull/8709/commits/c037c034ae94767a774ee614b717b1647e0afae0
fd8ffd0 fix(mothership): release a dropped run's hold once it settles, even a… waleedlatif1 Oct 7, 2026 https://github.com/simstudioai/sim/pull/8709/commits/fd8ffd0673dd63b507b1c1f3561b13c0b194a880
607b58c fix(mothership): re-send an undelivered workflow tool completion whil… waleedlatif1 Oct 7, 2026 https://github.com/simstudioai/sim/pull/8709/commits/607b58c1c6266eb019fe7f30e32389c785a48eb2
9e1037d improvement(mothership): keep each workflow's run-tool slot in one re… waleedlatif1 Oct 7, 2026 https://github.com/simstudioai/sim/pull/8709/commits/9e1037d55f097f859c934d59554f939070a81324
e65f6c7 fix(mothership): clear a dropped run's saved pointer when its hold is… waleedlatif1 Oct 7, 2026 https://github.com/simstudioai/sim/pull/8709/commits/e65f6c7580cce89eeee299907d4a423b4b83d92f
Clear filters https://github.com/simstudioai/sim/pull/8709/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8709/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8709/files
use-execution-stream.ts https://github.com/simstudioai/sim/pull/8709/files#diff-b3b31068349399e081fab62ec3409acb4fc49cfb5b8be2c54234d25bd0882cf8
run-tool-execution.test.ts https://github.com/simstudioai/sim/pull/8709/files#diff-af6cac52bcca5b36dae9eff9c6ecca6f7b9b77ccf0ef7f221cab2bf5ef656121
run-tool-execution.ts https://github.com/simstudioai/sim/pull/8709/files#diff-66cadf79a19113b63186dc166f18e6ba2998dbee947a2670f162bb8fc83856c5
apps/sim/hooks/use-execution-stream.tshttps://github.com/simstudioai/sim/pull/8709/files#diff-b3b31068349399e081fab62ec3409acb4fc49cfb5b8be2c54234d25bd0882cf8
View file https://github.com/simstudioai/sim/blob/e65f6c7580cce89eeee299907d4a423b4b83d92f/apps/sim/hooks/use-execution-stream.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8709/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8709/files#diff-b3b31068349399e081fab62ec3409acb4fc49cfb5b8be2c54234d25bd0882cf8
https://github.com/simstudioai/sim/pull/8709/files#diff-b3b31068349399e081fab62ec3409acb4fc49cfb5b8be2c54234d25bd0882cf8
Please reload this pagehttps://github.com/simstudioai/sim/pull/8709/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8709/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.