Skip to content

fix: reduce ToolServer contention during tool lookup and execution#1607

Merged
gold-silver-copper merged 15 commits into0xPlaygrounds:mainfrom
isSerge:fix-concurrent-exec-block-in-toolserver
Apr 7, 2026
Merged

fix: reduce ToolServer contention during tool lookup and execution#1607
gold-silver-copper merged 15 commits into0xPlaygrounds:mainfrom
isSerge:fix-concurrent-exec-block-in-toolserver

Conversation

@isSerge
Copy link
Copy Markdown
Contributor

@isSerge isSerge commented Apr 7, 2026

Fixes #1573

  • Replace the ToolServer mpsc/oneshot message loop with a shared ToolServerHandle(Arc<RwLock<...>>) implementation.
  • Update ToolSet internals to store tools behind Arc so tool handles can be cloned under a short read lock before executing.
  • Add concurrency-focused tests for the new behavior
  • Replace SleeperTool with BarrierTool to avoid artificial sleeping in existing tests

isSerge added 13 commits April 7, 2026 11:45
… into Arc internally

fix: remove unnecessary Arc wrapping in dynamic_context calls for improved performance

fix: simplify dynamic_context parameter type to improve usability and reduce unnecessary Arc wrapping
…isSerge/rig into fix-concurrent-exec-block-in-toolserver
…isSerge/rig into fix-concurrent-exec-block-in-toolserver
…isSerge/rig into fix-concurrent-exec-block-in-toolserver
@gold-silver-copper
Copy link
Copy Markdown
Contributor

Awesome PR, thanks @isSerge

@gold-silver-copper gold-silver-copper added this pull request to the merge queue Apr 7, 2026
Merged via the queue into 0xPlaygrounds:main with commit 013d65a Apr 7, 2026
6 checks passed
This was referenced Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: ToolServer actor loop blocks under concurrent tool execution and dynamic tool lookups

2 participants