Skip to content

fix: check matching IDs before skipping pending tool recovery#1407

Open
Aaromalpm wants to merge 2 commits into
agentscope-ai:mainfrom
Aaromalpm:fix/pending-tool-recovery-id-matching
Open

fix: check matching IDs before skipping pending tool recovery#1407
Aaromalpm wants to merge 2 commits into
agentscope-ai:mainfrom
Aaromalpm:fix/pending-tool-recovery-id-matching

Conversation

@Aaromalpm
Copy link
Copy Markdown

Fixes #1406

Problem

The hook was skipping auto-recovery whenever any ToolResultBlock existed
in the input messages, even if those results were unrelated to the pending
tool call IDs.

Fix

Instead of checking if any ToolResultBlock exists, now we extract the IDs
from the input ToolResultBlocks and check if they actually match the
pending tool call IDs. Recovery is only skipped when there is a genuine match.
4. Make sure the base repository is agentscope-ai/agentscope-java and base branch is main
5. Click Create pull request

@Aaromalpm Aaromalpm requested a review from a team May 15, 2026 14:20
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
.../agentscope/core/hook/PendingToolRecoveryHook.java 83.33% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

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]: PendingToolRecoveryHook skips recovery when input contains unrelated ToolResultBlock IDs

3 participants