[BUG] CancelTask and SubscribeToTask succeed on a terminal task
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start in go/core/internal/a2agateway/interactions.go: CancelTask at L32-34 and subscribeToTask at L115, with the shared isQuiescent helper at L326-328. For subscribe, decide the terminal-only check separately from requiresInput() so INPUT_REQUIRED/AUTH_REQUIRED tasks still stream; for cancel, return TaskNotCancelableError on terminal tasks (the issue allows keeping idempotent success for an already-canceled task). Read the A2A v1.0.1 §3.1.5/§3.1.6 sections linked above, then run the existing tests under go/core/internal/a2agateway and add cases for each terminal state.
Written by the indexing model from the issue text.
Description
📋 Prerequisites
- I have searched the existing issues to avoid creating a duplicate
- By submitting this issue, you agree to follow our Code of Conduct
- I am using the latest version of the software (checked against
mainat e8cd153) - I have tried to clear cache/cookies or used incognito mode (if ui-related)
- I can consistently reproduce this issue
🎯 Affected Service(s)
Controller (A2A gateway)
🚦 Impact/Severity
Minor
🐛 Bug Description
On a task in a terminal state (COMPLETED, FAILED, CANCELED, REJECTED):
CancelTaskreturns the task as a success (interactions.goL32-34). A2A 1.0.1 §3.1.5 listsTaskNotCancelableErrorfor a task that is "already completed, failed, or canceled".SubscribeToTaskreturns the stored task and ends the stream (subscribeToTask), where §3.1.6 listsUnsupportedOperationError.
🔄 Steps To Reproduce
- Run a message to completion.
- Call
CancelTask, thenSubscribeToTask, with its task ID.
🤔 Expected Behavior
TaskNotCancelableError from CancelTask and UnsupportedOperationError from SubscribeToTask on a terminal task.
📱 Actual Behavior
Both calls succeed.
🔍 Additional Context
subscribeToTaskchecksisQuiescent, which isTerminal() || requiresInput()(L326-328). The error must apply to terminal states only: §3.1.6 allows subscribing to anINPUT_REQUIREDorAUTH_REQUIREDtask.- For an already canceled task, §3.1.5 asks for
TaskNotCancelableError, while §3.3.1 says cancellation is idempotent. Keeping success for a repeated cancel is defensible; the spec allows either.
- Dominant language
- Go
- Stars
- 4.5k
- Forks
- 937
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 150
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from kagent-dev/kagent
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
kagent-dev/kagent#3792 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
kagent-dev/kagent#3789 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
kagent-dev/kagent#3787 ·
Maintainers usually reply within 1 day
-
[BUG] Python memory summarization fails for Gemini models: the request has no model namePossibly taken @BahaaMattar claimed this 6 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
kagent-dev/kagent#3710 ·
Maintainers usually reply within 1 day
-
skills-init: commit-SHA skill refs never start (git checkout -- <sha> reads the SHA as a pathspec)Possibly taken @talcoh2x claimed this 14 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 84/100
kagent-dev/kagent#3571 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in kagent-dev/kagent
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Add CybeDefendOpen
Difficulty 1/5 Under an hour Newbie friendliness 66/100
slavakurilyak/awesome-ai-agents#1031 ·
-
ai-driven-qa bug claude Minor
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
linagora/cozy-stack#5374 ·
Maintainers usually reply within 1 day
-
new-compilers request
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
compiler-explorer/compiler-explorer#9640 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
google/certificate-transparency-go#1859 ·
Maintainers usually reply within 1 day