You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 92f9558
Browse filesBrowse the repository at this point in the historyBrowse files
fix(filesystem): hold tool calls while any roots refresh is pending
A runtime roots/list_changed refresh now replaces the initialization barrier, as the initial load and an overtaking refresh already did, so tool calls that arrive while its roots/list is pending wait for the result instead of running against the previous allow-list, which could still include a root the client had just withdrawn. The initialRootsPending flag is no longer needed.
Closes#5101
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
Tool calls that arrive while a `roots/list_changed` refresh is fetching the client's roots now wait for it, as they already did for the initial roots, so a call can no longer reach a root the client has just withdrawn while the answer is pending (#5101).
Copy file name to clipboardExpand all lines: src/filesystem/README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,6 +51,7 @@ The server's directory access control follows this flow:
51
51
- Tool calls that arrive before the initial roots are loaded wait for them, so they are checked against the client's roots
52
52
-**On runtime updates**: Client can send `notifications/roots/list_changed`
53
53
- Server requests updated roots and replaces allowed directories again
54
+
- Tool calls that arrive while an update is being fetched wait for it, so none runs against a root the client has just withdrawn
54
55
- Once the client's roots are in force, an update with no valid roots revokes access: every path is refused ("Access denied - no allowed directories") until the client exposes a root again. Before any root has been in force, such an update keeps the command-line directories
55
56
56
57
4.**Fallback Behavior** (if client doesn't support roots)
0 commit comments