[BUG] ListTasks is not sorted by last update time, newest first
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 80/100
Research direction
Start in go/core/internal/database/agent_tasks.go around L45-52, where ListTasks builds the page cursor and the ORDER BY t.position, t.id query. Read how the cursor tuple is constructed and used for pagination, then change both the ordering and cursor to (t.status_timestamp, t.id) with descending status timestamp. Done means the most recently updated task is returned first and pagination remains consistent across pages; run the relevant database tests if present.
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
ListTasks orders tasks by history position (agent_tasks.go L52, ORDER BY t.position, t.id). A2A 1.0.1 §3.1.4 says tasks MUST be sorted by last update time in descending order.
🔄 Steps To Reproduce
- Create two tasks in one context, then update the first one again.
- Call
ListTasksfor that context.
🤔 Expected Behavior
The most recently updated task comes first.
📱 Actual Behavior
The oldest task comes first.
🔍 Additional Context
The page cursor is also (t.position, t.id) (L45-48), so the cursor has to move to (t.status_timestamp, t.id) together with an ORDER BY t.status_timestamp DESC, t.id; changing only the ORDER BY breaks pagination. §3.1.4 names the status timestamp as the sort key.
- 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 78/100
kagent-dev/kagent#3790 ·
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