Skip to content

Fix inter-agent communication timeout in Aethel integration test#59

Merged
colleenpridemore merged 2 commits into
mainfrom
copilot/fix-inter-agent-timeout
Jan 14, 2026
Merged

Fix inter-agent communication timeout in Aethel integration test#59
colleenpridemore merged 2 commits into
mainfrom
copilot/fix-inter-agent-timeout

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 14, 2026

The Aethel integration test hangs for 5 minutes then times out because protocol.send() with type: 'request' creates a Promise waiting for protocol.respond(), but the test manually calls handleMessage() instead, so the Promise never resolves.

Changes

  • Changed message type from 'request' to 'notification' in agents/examples/aethel-integration.js:180

Details

The communication protocol has two distinct patterns:

// REQUEST: waits for protocol.respond() call
if (type === MessageType.REQUEST) {
  return this._waitForResponse(message);  // Promise hangs until respond()
}

// NOTIFICATION: returns immediately
return { messageId: message.messageId, status: MessageStatus.SENT };

The test manually invokes aethelAgent.handleMessage() to process the message, bypassing the protocol's response mechanism. Using 'notification' type is correct here since no protocol.respond() will be called.

// Before: hangs waiting for protocol.respond()
await protocol.send({
  type: 'request',  // ❌ Creates Promise that never resolves
  ...
});

// After: returns immediately
await protocol.send({
  type: 'notification',  // ✅ Returns after queuing
  ...
});

// Test manually handles the message
const result = await aethelAgent.handleMessage({...});
Original prompt

Fix Inter-Agent Communication Timeout in Aethel Integration Test

Problem

The Aethel integration test is failing due to a timeout in the inter-agent communication step. The test runs for 5 minutes and then times out with the error:

✗ Inter-agent communication failed: Request timeout
##[error]The action 'Run Aethel integration example' has timed out after 5 minutes.

Root Cause

The test code in agents/examples/aethel-integration.js (lines 163-212) is mixing two incompatible communication patterns:

  1. It sends a REQUEST type message via protocol.send(), which creates a Promise that waits for a response through protocol.respond()
  2. But then it manually calls aethelAgent.handleMessage() directly, bypassing the protocol's response mechanism
  3. The protocol.send() Promise never gets resolved because no one calls protocol.respond(), causing it to hang until timeout

Solution

Change the message type from 'request' to 'notification' since the test doesn't actually need a formal request/response cycle through the protocol. The test is already handling the response by directly calling handleMessage() and checking the result.

Changes Required

In agents/examples/aethel-integration.js, line 180:

  • Change type: 'request' to type: 'notification'

This allows the protocol.send() to return immediately after queuing the message for delivery, rather than waiting for a response that will never come through the protocol's proper channels.

Testing

After this fix:

  • The inter-agent communication step should complete successfully
  • The test should no longer timeout
  • All other test steps should continue to work as expected

This pull request was created from Copilot chat.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…ification

Co-authored-by: colleenpridemore <4281084+colleenpridemore@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix inter-agent communication timeout in Aethel integration test Fix inter-agent communication timeout in Aethel integration test Jan 14, 2026
Copy link
Copy Markdown
Contributor

@colleenpridemore colleenpridemore left a comment

Choose a reason for hiding this comment

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

ok!

@colleenpridemore colleenpridemore marked this pull request as ready for review January 14, 2026 21:10
Copilot AI review requested due to automatic review settings January 14, 2026 21:10
@colleenpridemore colleenpridemore merged commit 9af12fe into main Jan 14, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a timeout issue in the Aethel integration test where inter-agent communication was hanging for 5 minutes before failing. The problem occurred because the test was sending a 'request' type message via protocol.send(), which creates a Promise that waits for a corresponding protocol.respond() call, but the test manually invoked handleMessage() directly, bypassing the protocol's response mechanism and leaving the Promise unresolved.

Changes:

  • Changed message type from 'request' to 'notification' on line 180 of agents/examples/aethel-integration.js

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants