Skip to content

Conversation

@prassanna-ravishankar
Copy link
Member

Previously, the task_cancel method incorrectly used task_name as the agent_name for RPC routing, causing cancellation requests to be sent to the wrong agent or fail entirely. This fix separates agent identification (who to send the RPC to) from task identification (which task to cancel within that agent).

The fix adds agent_id and agent_name parameters to properly route cancellation requests to the correct agent, while task identification parameters are passed in the RPC payload. Both agent and task identification are now required and validated.

This ensures task cancellation works correctly across the system without breaking existing API compatibility.

- Fix task_cancel method to properly require agent identification
- Previously incorrectly assumed task_name == agent_name and task_id == agent_id
- Now correctly requires both agent (owner) and task parameters
- Updated method signatures across ACPModule, activities, and service layers
- Added test documentation showing correct usage pattern

BREAKING CHANGE: task_cancel now requires explicit agent_name/agent_id parameter to identify which agent owns the task being cancelled
@prassanna-ravishankar prassanna-ravishankar merged commit 48cdeea into main Sep 8, 2025
7 of 8 checks passed
@prassanna-ravishankar prassanna-ravishankar deleted the fix/task-cancellation branch September 8, 2025 10:52
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.

3 participants