Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c15b5db5a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| last_task_message: metadata | ||
| .last_task_message | ||
| .clone() | ||
| .or(last_task_message_for_thread(thread.as_ref()).await), |
There was a problem hiding this comment.
Avoid eager history scans when last task is already cached
list_agents uses Option::or(...), which evaluates last_task_message_for_thread(...) eagerly even when metadata.last_task_message is already Some. That forces per-agent pending/queued/history snapshots on every call, making listing scale with full thread history size and adding avoidable latency under many agents. Use a lazy fallback path instead.
Useful? React with 👍 / 👎.
Add a
list_agentsfor multi-agent v2, optionally path basedThis return the task and status of each agent in the matched path