-
Notifications
You must be signed in to change notification settings - Fork 5
Fix hooks and permission dispatch for sub-agent sessions #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 3 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
2faaaca
Initial plan
Copilot b1efa7b
Fix onPreToolUse hook not firing for sub-agent tool calls
Copilot 5a8a2b4
Improve Javadoc for findSessionWithHooks and findSessionWithPermissio…
Copilot 1d0bf62
Revert SDK-level fallback to match upstream .NET/Node.js/Go behavior
Copilot af77a26
On branch edburns/dd-2853206-reference-impl-not-upstream We are track…
edburns f3f196b
Replace upstream terminology with reference implementation
edburns 1413aa6
Fix [reference-impl-hash] parameter naming in update-changelog.sh
Copilot 55df001
Ignore tilde files
edburns 36de59c
Address very important comment by copilot.
edburns 123bb06
Apply review suggestions: fix assignee, grammar, and refererce-impl typo
Copilot a512425
Recompile agentic workflow lock file from updated .md source
edburns 3e3ae55
Add classical code generation workflow for typed event and RPC classes
edburns 5d92685
Prevent local IDEs from editing generated code
edburns 0ef029f
Apply Copilot review comments.
edburns 7be5337
Fix compilation failure.
edburns 5f399a1
Initial plan
Copilot 5f1520a
Fix (int) cast incompatibility with boxed Double in Quick Start code
Copilot 3f861bf
Initial plan
Copilot 25bb498
Add comprehensive test coverage for generated RPC code
Copilot 8556e93
Potential fix for pull request finding 'Unread local variable'
edburns 651f843
Move test files to match generated package structure
Copilot 2293b86
Fix POSIXisms: use TestUtil.tempPath() for cross-platform temp paths
Copilot 7de0184
Fix race condition in sendAndWait: use whenCompleteAsync to prevent t…
Copilot cfe541c
Update JaCoCo coverage badge
edburns ea206da
docs: update version references to 0.3.0-java-preview.0
github-actions[bot] 0e06c37
[maven-release-plugin] prepare release v0.3.0-java-preview.0
github-actions[bot] af969e3
[maven-release-plugin] prepare for next development iteration
github-actions[bot] 16e9d61
Initial plan
Copilot 04c32e9
Port reference implementation sync: McpServerConfig types, ModelCapab…
Copilot b63c33f
Fix limits mapping in setModel and fix import order in ProviderConfig
Copilot 50d42ea
Initial plan
Copilot ba9c9e0
Fix hooks and permission dispatch for sub-agent sessions
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
findSessionWithHooks() returns the “first” session found with hooks, but sessions is a ConcurrentHashMap so iteration order is not deterministic. If multiple sessions register hooks, fallback selection becomes effectively random and could run the wrong hooks. Consider only falling back when exactly one candidate session has hooks (otherwise return an error / null), or introduce a deterministic selection strategy (e.g., track a designated ‘default hooks’ session).
This issue also appears on line 362 of the same file.