Repository navigation
Conversation
Shawrange
force-pushed
the
fix/hitl-denied-confirm-state
branch
from
November 27, 2026 09:17
951c094 to
0850f5f
Compare
Author
|
Hi @chickenlj — I've rebased this PR onto |
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes #3619.
In
ReActAgent.CallExecution.applyConfirmResults(), approvedToolUseBlocks are promoted fromToolCallState.ASKINGtoToolCallState.ALLOWED, but deniedToolUseBlocks were left inToolCallState.ASKINGinside persistedAgentState.context. Even with thependingIdsguard inaskingToolCalls()(from #4443), persisted state and partial-denialPERMISSION_ASKINGresponses still expose already-denied tool calls asASKINGacross fresh-runtime recovery, stop-on-denial middleware, and multi-tool batches.Changes
ReActAgent.CallExecution.applyConfirmResults(): Transition deniedToolUseBlocks toToolCallState.FINISHEDviareplacements(preserving serialized state compatibility with existingToolCallStatevalues and downstream consumers) and update Javadoc.ReActAgentPermissionPersistenceTest: Added parameterized offline JUnit 5 regression tests across bothAgentStateStoreandThreadJournalStorecovering single denial (with and withoutAllToolsDeniedEventstop middleware), partial denial in a multi-tool batch, mixed deny + external suspension, and legacy persisted state recovery.Verification
ReActAgentPermissionPersistenceTest,ReActAgentHitlTest): 49 tests run, 0 failures.agentscope-coretest suite (mvn -T1C -pl agentscope-core -am test -Dtest=!DangerousPathBypassTest): 3,503 tests run, 0 failures.mvn -T1C -pl agentscope-core -am spotless:check): passed.