Skip to content

fix: branch filtering in ParallelAgent subagents#720

Open
jkumz wants to merge 1 commit intogoogle:mainfrom
jkumz:main
Open

fix: branch filtering in ParallelAgent subagents#720
jkumz wants to merge 1 commit intogoogle:mainfrom
jkumz:main

Conversation

@jkumz
Copy link
Copy Markdown

@jkumz jkumz commented Apr 10, 2026

Link to Issue or Description of Change

1. Link to an existing issue (if applicable):

2. Or, if no issue exists, describe the change:

N/A

Testing Plan

Please describe the tests that you ran to verify your changes. This is required
for all PRs that are not small documentation or typo fixes.

Unit Tests:

  • I have added or updated unit tests for my change.
  • All unit tests pass locally. (NOTE: Unit tests that were already failing prior to my changes are still failing - not affected by these. changes)

Please include a summary of passed go test results.

A new test suite (TestContentsRequestProcessor_IncludeContentsNone_ParallelBranch) was added to contents_processor_test.go and passes locally. Specifically, this verifies two complex edge cases for parallel interactions:

  1. FirstModelCall_AlphaFCPresent: Verifies that if sibling agent A yields a FunctionCall on its branch, agent B still correctly anchors onto the root user message without being interrupted.
  2. SecondModelCall_BetaFCFRPresent: Verifies that agent B successfully scans backward past sibling agent A's events to retrieve its own context (FunctionCall and FunctionResponse) as well as the root user message to prevent the empty-context crash.

Manual End-to-End (E2E) Tests:

Please provide instructions on how to manually test your changes, including any
necessary setup or configuration. Please provide logs or screenshots to help
reviewers better understand the fix.

N/A

Checklist

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have manually tested my changes end-to-end.
  • Any dependent changes have been merged and published in downstream modules.

Additional context

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

buildContentsCurrentTurnContextOnly ignores branch filtering, breaking IncludeContents="none"in ParallelAgent

1 participant