Skip to content

fix: parallel agent execution#1073

Closed
glaforge wants to merge 1 commit intogoogle:mainfrom
glaforge:feature/parallel-agent
Closed

fix: parallel agent execution#1073
glaforge wants to merge 1 commit intogoogle:mainfrom
glaforge:feature/parallel-agent

Conversation

@glaforge
Copy link
Contributor

Follow up to #610 as a test was failing:

ParallelAgentTest.runAsync_subAgentsExecuteInParallel_eventsOrderedByCompletion:101 » NoSuchElement No value present

The test was failing because the branch was empty. This happened because the BaseAgent would only "append" its name to an existing branch. If the root agent was started with no branch (which is common in tests), its context—and subsequently its sub-agents' contexts—remained branchless.

@glaforge glaforge force-pushed the feature/parallel-agent branch from a2d57a4 to c84be11 Compare March 23, 2026 11:20
long duration = System.currentTimeMillis() - startTime;

assertThat(events).hasSize(2);
// If parallel, duration should be less than 1.5 * sleepTime (1500ms).
Copy link

Choose a reason for hiding this comment

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

I think it'd be better to use locks / cvars to test this.

I won't block the submission on it, but relying on sleeps tends to lead to test flakiness.

@glaforge glaforge force-pushed the feature/parallel-agent branch 3 times, most recently from 899b2f2 to 2b63184 Compare March 23, 2026 16:23
…text management

- Implement ParallelAgent for concurrent sub-agent execution
- Add branch propagation logic for invocation context management
- Fix branch name initialization in BaseAgent
@glaforge glaforge force-pushed the feature/parallel-agent branch from 2b63184 to fd92efd Compare March 23, 2026 16:30
@krwc
Copy link

krwc commented Mar 25, 2026

We will resolve this in #1077.

@krwc krwc closed this Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants