Skip to content

prompt_rebuild_hook.py / _query_memory_overview() “most recent” assumption may be wrong #44

@double16

Description

@double16

What happened?

_query_memory_overview() “most recent” assumption may be wrong

results = results[:30]
for r in results[:5]:

…but we never ensure the list is sorted “most recent first”. Many backends return oldest-first or arbitrary order unless explicitly requested.

Impact: the “recent_summary” can be stale / misleading even within the correct run.

Fix direction: request ordering from the backend if supported (or sort by created_at / timestamp metadata if present).

How to reproduce

Code review

How are you running it?

Python CLI

Provider and Model

No response

Operating System

No response

Python Version

No response

Node Version (if using React UI)

No response

Cyber-AutoAgent Version

No response

Error logs

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions