Skip to content

feat: custom watcher for multi-agent v2#15570

Merged
jif-oai merged 3 commits intomainfrom
jif/v2-watcher
Mar 23, 2026
Merged

feat: custom watcher for multi-agent v2#15570
jif-oai merged 3 commits intomainfrom
jif/v2-watcher

Conversation

@jif-oai
Copy link
Collaborator

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

Custom watcher that sends an InterAgentCommunication on end of turn

@jif-oai
Copy link
Collaborator Author

jif-oai commented Mar 23, 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: 32c2995cf4

ℹ️ 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 +724 to +731
if let Some(child_agent_path) = child_agent_path
&& child_thread
.as_ref()
.map(|thread| thread.enabled(Feature::MultiAgentV2))
.unwrap_or(true)
{
let AgentStatus::Completed(Some(content)) = &status else {
return;
Copy link
Contributor

Choose a reason for hiding this comment

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

P1 Badge Fall back to legacy watcher when child thread lookup fails

In maybe_start_completion_watcher, a missing child thread is treated as MultiAgentV2 by default (unwrap_or(true)). If a legacy child with an agent_path is removed before this check, execution enters the v2 branch and then returns for non-Completed(Some(_)) states, so the parent never gets the old completion notification. This regresses legacy task_name/path-based spawn flows.

Useful? React with 👍 / 👎.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

V1 can't have agent_path

@jif-oai
Copy link
Collaborator Author

jif-oai commented Mar 23, 2026

@codex review

@jif-oai jif-oai merged commit 4605c65 into main Mar 23, 2026
31 of 35 checks passed
@jif-oai jif-oai deleted the jif/v2-watcher branch March 23, 2026 22:56
@github-actions github-actions bot locked and limited conversation to collaborators Mar 23, 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