René's URL Explorer Experiment


Title: fix(agent): keep tool modes on their tools across API and concurrent edits by j15z · Pull Request #7829 · simstudioai/sim · GitHub

Open Graph Title: fix(agent): keep tool modes on their tools across API and concurrent edits by j15z · Pull Request #7829 · simstudioai/sim

X Title: fix(agent): keep tool modes on their tools across API and concurrent edits by j15z · Pull Request #7829 · simstudioai/sim

Description: Summary Stacked on #7538. Fixes two problems found while QA-ing variable tool permission modes. API and Chat edits lose the inactive value of a basic/advanced pair. An edit replaces the whole tools list, so switching a pair by sending only one side dropped the other side's stored value. This affected Permission Mode (sending only usageControlExpression dropped the fixed usageControl) and nested tool params (sending only Jira's manualProjectId dropped the picked projectId). The edit engine now matches each rewritten tool to the one it replaced and: keeps the side the caller left out, selects the mode from the side the caller sent (both sides, or a pair resent unchanged, keeps the current mode), leaves tools identical to their previous entry untouched. Concurrent editors can put a tool mode on the wrong tool. Tool-scoped mode keys are positional (${toolIndex}:…), and a toggle racing another editor's removal or reorder could persist at an index its tool no longer holds, so the next tool added there silently inherited Variable mode with an empty expression and runs failed. Now: a tool-scoped toggle carries a toolRef (subblock, index, tool identity) and the realtime server skips it when that position holds a different tool; a skipped toggle is confirmed to its sender but not broadcast, editors ignore a broadcast toggle for a tool they have already moved or removed, removing or reordering tools always saves the list and its modes in one operation, including when none of the editor's own modes need to move. A toggle made at the same moment as another editor's removal can still be dropped, but consistently: every editor and the saved state agree, and it can no longer land on another tool. toolRef is optional, so older clients and servers keep the previous behavior. Type of Change Bug fix New feature Breaking change Documentation Other: ___________ Testing Unit tests for the edit-engine mode selection and carry-over, the shared tool identity guard, realtime persistence of guarded toggles, and skipping the broadcast of a stale toggle. type-check for sim, realtime, and realtime-protocol; Biome; check:api-validation, check:boundaries, and check:realtime-prune pass. Manual, v2 API: on a Jira + Wikipedia agent, switching to manual ID / Variable and back keeps both sides; a read-and-resend round trip leaves modes unchanged; reordering moves modes with their tools. Before this change the picked project and the fixed none were dropped. Manual, two editors: one tab toggles tool 3 while the other removes tool 1 at fixed offsets. Before: 5 of 5 rounds lost or misplaced the toggle, 2 left it on an empty position. After: 7 rounds, none misplaced; the server logged the skipped stale toggles; with the toggle clearly first it stays on its tool. Reviewers: applySuppliedToolModes in lib/workflows/editing/tool-modes.ts and isToolInputRefCurrent in packages/realtime-protocol/src/tool-input.ts. 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) Screenshots/Videos No screenshots attached. 🤖 Generated with Claude Code

Open Graph Description: Summary Stacked on #7538. Fixes two problems found while QA-ing variable tool permission modes. API and Chat edits lose the inactive value of a basic/advanced pair. An edit replaces the whole tools...

X Description: Summary Stacked on #7538. Fixes two problems found while QA-ing variable tool permission modes. API and Chat edits lose the inactive value of a basic/advanced pair. An edit replaces the whole tools...

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

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:dbbaf5ad-d187-a957-0b41-200c78e5bc05
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDC2C:2F2AB3:C474BE:10E67B7:6AFB5680
html-safe-nonce1ddca8e89e315042499326569941f4406f8aaa320af85beeba708183095aa2aa
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQzJDOjJGMkFCMzpDNDc0QkU6MTBFNjdCNzo2QUZCNTY4MCIsInZpc2l0b3JfaWQiOiI2MjI2MzQyODI4NzA4NjgxMzQ0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacacdbcd580ab8ca43a44971ad7351f80c2093a14033383b2ede98d184cd370ec1
hovercard-subject-tagpull_request:4531597770
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/7829/files
twitter:imagehttps://avatars.githubusercontent.com/u/96924014?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/96924014?s=400&v=4
og:image:altSummary Stacked on #7538. Fixes two problems found while QA-ing variable tool permission modes. API and Chat edits lose the inactive value of a basic/advanced pair. An edit replaces the whole tools...
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/7829/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F7829%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%2F7829%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/7829/files
Reloadhttps://github.com/simstudioai/sim/pull/7829/files
Reloadhttps://github.com/simstudioai/sim/pull/7829/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
j15zhttps://github.com/j15z
codex/agent-tool-permission-modehttps://github.com/simstudioai/sim/tree/codex/agent-tool-permission-mode
codex/agent-tool-mode-sync-fixeshttps://github.com/simstudioai/sim/tree/codex/agent-tool-mode-sync-fixes
Conversation 5 https://github.com/simstudioai/sim/pull/7829
Commits 1 https://github.com/simstudioai/sim/pull/7829/commits
Checks 4 https://github.com/simstudioai/sim/pull/7829/checks
Files changed https://github.com/simstudioai/sim/pull/7829/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7829/files
fix(agent): keep tool modes on their tools across API and concurrent edits https://github.com/simstudioai/sim/pull/7829/files#top
Show all changes 1 commit https://github.com/simstudioai/sim/pull/7829/files
3d5617d fix(agent): keep tool modes on their tools across API and concurrent … j15z Sep 14, 2026 https://github.com/simstudioai/sim/pull/7829/commits/3d5617d1ff0bf8a98c4087ebc86fb58c18531f6b
Clear filters https://github.com/simstudioai/sim/pull/7829/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7829/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7829/files
operations.test.ts https://github.com/simstudioai/sim/pull/7829/files#diff-7325da1e147963f0023dc5b719e09d029cc18731b15b417e2844162c9561443d
operations.ts https://github.com/simstudioai/sim/pull/7829/files#diff-e8428fa80ec5afb5442d2c399ae8dccd54ba450b45cbaae13a15c833911be725
operations.test.ts https://github.com/simstudioai/sim/pull/7829/files#diff-f6edae6d2295dd723f942192148d7362f73d7fe4c9a31693b6f1bc411b9af45e
operations.ts https://github.com/simstudioai/sim/pull/7829/files#diff-8118483fbc555f221d9430e8d3b256aa70da2aa2b2f53d71d7cbd09206c57869
tool-input.tsx https://github.com/simstudioai/sim/pull/7829/files#diff-9d18e37ae3bc1e0d6e4ea27b679516985bafc2a806b5adbddd05f35599dc5044
use-collaborative-workflow.ts https://github.com/simstudioai/sim/pull/7829/files#diff-ccb80da85d47ecf517b42ec89718b19771184b32f2171a7705ddf236de89d46a
builders.ts https://github.com/simstudioai/sim/pull/7829/files#diff-77372451cda55e4433dc1eec73daa7839f540be5f619e6c157a5a289ba1ef502
engine.ts https://github.com/simstudioai/sim/pull/7829/files#diff-edcfe5af5b1850957818b19d0fc5feff46cae6acc1ddbb2a85eeb1610ae37eba
operations.test.ts https://github.com/simstudioai/sim/pull/7829/files#diff-6bb2b130cdc72cb4252605227c02134b7c8d196515f6426379ca6d41a2d7f1cc
tool-modes.test.ts https://github.com/simstudioai/sim/pull/7829/files#diff-dfcb214b2c593747b958c2c3d986c669384efa8e9f249b3d8caafae744a146be
tool-modes.ts https://github.com/simstudioai/sim/pull/7829/files#diff-3a993b64c3f4c760b8035b7f2328241cb10cc7acbe98bd197ef82f70336f933c
visibility.ts https://github.com/simstudioai/sim/pull/7829/files#diff-cbbf86d19acdc23be631c1b3a7e5d455c699b1e5c1dea80bff0fe706e14fe61e
usage-control.test.ts https://github.com/simstudioai/sim/pull/7829/files#diff-bf081466e5711cc8871a3677757f72c5383f7dee3ed7fbfa2616016fc73e42b2
usage-control.ts https://github.com/simstudioai/sim/pull/7829/files#diff-a127047fe1557b9a51de85be7311077a772c672e8d9289334787033eb9bf8ee6
package.json https://github.com/simstudioai/sim/pull/7829/files#diff-d75b24dd1f8c9a9d138e3f71a6574e78b00e204d868d9ea4dd4016b98304d914
schemas.ts https://github.com/simstudioai/sim/pull/7829/files#diff-3feb8202eabab90877fd4e0b2418e201080d3a125e6918be11f3b9916157495b
tool-input.test.ts https://github.com/simstudioai/sim/pull/7829/files#diff-34bf6d429de8630522a9a4e20c95e3b0d9813549673248164f2a944e7db67e8a
tool-input.ts https://github.com/simstudioai/sim/pull/7829/files#diff-bd0ccc0874879f72e7725dc6e90b528683f520f32b6efb843980fb058ae85228
apps/realtime/src/database/operations.test.tshttps://github.com/simstudioai/sim/pull/7829/files#diff-7325da1e147963f0023dc5b719e09d029cc18731b15b417e2844162c9561443d
View file https://github.com/simstudioai/sim/blob/3d5617d1ff0bf8a98c4087ebc86fb58c18531f6b/apps/realtime/src/database/operations.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7829/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7829/files#diff-7325da1e147963f0023dc5b719e09d029cc18731b15b417e2844162c9561443d
https://github.com/simstudioai/sim/pull/7829/files#diff-7325da1e147963f0023dc5b719e09d029cc18731b15b417e2844162c9561443d
https://github.com/simstudioai/sim/pull/7829/files#diff-7325da1e147963f0023dc5b719e09d029cc18731b15b417e2844162c9561443d
https://github.com/simstudioai/sim/pull/7829/files#diff-7325da1e147963f0023dc5b719e09d029cc18731b15b417e2844162c9561443d
https://github.com/simstudioai/sim/pull/7829/files#diff-7325da1e147963f0023dc5b719e09d029cc18731b15b417e2844162c9561443d
apps/realtime/src/database/operations.tshttps://github.com/simstudioai/sim/pull/7829/files#diff-e8428fa80ec5afb5442d2c399ae8dccd54ba450b45cbaae13a15c833911be725
View file https://github.com/simstudioai/sim/blob/3d5617d1ff0bf8a98c4087ebc86fb58c18531f6b/apps/realtime/src/database/operations.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7829/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7829/files#diff-e8428fa80ec5afb5442d2c399ae8dccd54ba450b45cbaae13a15c833911be725
https://github.com/simstudioai/sim/pull/7829/files#diff-e8428fa80ec5afb5442d2c399ae8dccd54ba450b45cbaae13a15c833911be725
https://github.com/simstudioai/sim/pull/7829/files#diff-e8428fa80ec5afb5442d2c399ae8dccd54ba450b45cbaae13a15c833911be725
https://github.com/simstudioai/sim/pull/7829/files#diff-e8428fa80ec5afb5442d2c399ae8dccd54ba450b45cbaae13a15c833911be725
https://github.com/simstudioai/sim/pull/7829/files#diff-e8428fa80ec5afb5442d2c399ae8dccd54ba450b45cbaae13a15c833911be725
https://github.com/simstudioai/sim/pull/7829/files#diff-e8428fa80ec5afb5442d2c399ae8dccd54ba450b45cbaae13a15c833911be725
https://github.com/simstudioai/sim/pull/7829/files#diff-e8428fa80ec5afb5442d2c399ae8dccd54ba450b45cbaae13a15c833911be725
https://github.com/simstudioai/sim/pull/7829/files#diff-e8428fa80ec5afb5442d2c399ae8dccd54ba450b45cbaae13a15c833911be725
https://github.com/simstudioai/sim/pull/7829/files#diff-e8428fa80ec5afb5442d2c399ae8dccd54ba450b45cbaae13a15c833911be725
https://github.com/simstudioai/sim/pull/7829/files#diff-e8428fa80ec5afb5442d2c399ae8dccd54ba450b45cbaae13a15c833911be725
https://github.com/simstudioai/sim/pull/7829/files#diff-e8428fa80ec5afb5442d2c399ae8dccd54ba450b45cbaae13a15c833911be725
https://github.com/simstudioai/sim/pull/7829/files#diff-e8428fa80ec5afb5442d2c399ae8dccd54ba450b45cbaae13a15c833911be725
apps/realtime/src/handlers/operations.test.tshttps://github.com/simstudioai/sim/pull/7829/files#diff-f6edae6d2295dd723f942192148d7362f73d7fe4c9a31693b6f1bc411b9af45e
View file https://github.com/simstudioai/sim/blob/3d5617d1ff0bf8a98c4087ebc86fb58c18531f6b/apps/realtime/src/handlers/operations.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7829/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7829/files#diff-f6edae6d2295dd723f942192148d7362f73d7fe4c9a31693b6f1bc411b9af45e
apps/realtime/src/handlers/operations.tshttps://github.com/simstudioai/sim/pull/7829/files#diff-8118483fbc555f221d9430e8d3b256aa70da2aa2b2f53d71d7cbd09206c57869
View file https://github.com/simstudioai/sim/blob/3d5617d1ff0bf8a98c4087ebc86fb58c18531f6b/apps/realtime/src/handlers/operations.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7829/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7829/files#diff-8118483fbc555f221d9430e8d3b256aa70da2aa2b2f53d71d7cbd09206c57869
https://github.com/simstudioai/sim/pull/7829/files#diff-8118483fbc555f221d9430e8d3b256aa70da2aa2b2f53d71d7cbd09206c57869
greptile-appshttps://github.com/apps/greptile-apps
Sep 14, 2026https://github.com/simstudioai/sim/pull/7829/files#r4010432147
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
https://github.com/simstudioai/sim/pull/7829/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7829/files
https://github.com/simstudioai/sim/pull/7829/files#diff-8118483fbc555f221d9430e8d3b256aa70da2aa2b2f53d71d7cbd09206c57869
Please reload this pagehttps://github.com/simstudioai/sim/pull/7829/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.