Skip to content

feat: list agents for sub-agent v2#15621

Merged
jif-oai merged 1 commit intomainfrom
jif/list-agents
Mar 24, 2026
Merged

feat: list agents for sub-agent v2#15621
jif-oai merged 1 commit intomainfrom
jif/list-agents

Conversation

@jif-oai
Copy link
Collaborator

@jif-oai jif-oai commented Mar 24, 2026

Add a list_agents for multi-agent v2, optionally path based

This return the task and status of each agent in the matched path

@jif-oai
Copy link
Collaborator Author

jif-oai commented Mar 24, 2026

@codex review

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +763 to +766
last_task_message: metadata
.last_task_message
.clone()
.or(last_task_message_for_thread(thread.as_ref()).await),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@jif-oai jif-oai merged commit 38c088b into main Mar 24, 2026
33 of 35 checks passed
@jif-oai jif-oai deleted the jif/list-agents branch March 24, 2026 11:24
@github-actions github-actions bot locked and limited conversation to collaborators Mar 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant