Skip to content

Log agent runner error - #2158

Merged
JasonYeMSFT (JasonYeMSFT) merged 2 commits into
microsoft:mainfrom
JasonYeMSFT:chuye/log-copilot-sdk-error
May 5, 2026
Merged

Log agent runner error#2158
JasonYeMSFT (JasonYeMSFT) merged 2 commits into
microsoft:mainfrom
JasonYeMSFT:chuye/log-copilot-sdk-error

Conversation

@JasonYeMSFT

Copy link
Copy Markdown
Member

Description

In 5/2/2026 test runs, I saw in several azure-deploy tests, the agent exited early without reaching the Session.Idle event or timeout. My hypothesis is that Copilot SDK crashed and threw an error and thus exited earlier than expected. This PR makes our code log the error thrown by Copilot SDK to give each test run more observability.

Checklist

  • Tests pass locally (cd tests && npm test)
  • If modifying skill descriptions: verified routing correctness with integration tests (npm run test:skills:integration -- <skill>)
  • If modifying skill USE FOR / DO NOT USE FOR / PREFER OVER clauses: confirmed no routing regressions for competing skills

Related Issues

Copilot AI review requested due to automatic review settings May 4, 2026 22:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Improves observability in the Jest integration test agent runner by ensuring AgentMetadata exists earlier in the run and by recording thrown runner errors into the per-test testComments, so failures are easier to diagnose from generated reports.

Changes:

  • Initialize and attach agentMetadata to the cleanup entry before entering the main try block.
  • On runner failure, append a human-readable error note to agentMetadata.testComments in addition to logging to stderr.
Show a summary per file
File Description
tests/utils/agent-runner.ts Moves agentMetadata initialization earlier and records caught runner errors into testComments for inclusion in markdown/json reports.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment thread tests/utils/agent-runner.ts Outdated
@JasonYeMSFT
JasonYeMSFT (JasonYeMSFT) merged commit e0973d5 into microsoft:main May 5, 2026
11 checks passed
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