Skip to content

Classify Agent Host Copilot startup failures - #329714

Draft
roblourens (roblourens) wants to merge 1 commit into
mainfrom
agents/agent-host-copilot-failure-analysis
Draft

Classify Agent Host Copilot startup failures#329714
roblourens (roblourens) wants to merge 1 commit into
mainfrom
agents/agent-host-copilot-failure-analysis

Conversation

@roblourens

Copy link
Copy Markdown
Member

Adds bounded diagnostics to the existing Agent Host Copilot client-failure event after startup failures were observed to strand affected machines before any successful user turn.

The new fields classify:

  • startup cause, including native procedure/load failures, permission errors, timeouts, spawn failures, and process exits;
  • the bounded resource involved (runtime, cliNative, conpty, sandbox, or other);
  • a numeric process exit code when it can be safely parsed.

This also brings SDK startup timeouts into the existing startupFailed classification and recognizes EACCES/EPERM spawn errors as permission failures.

The fields avoid relying on raw exception text for aggregate reliability analysis. Retry/backoff behavior is intentionally left to a separate change because it affects product behavior.

Related: #329713

Validation

  • npm run transpile-client
  • ./scripts/test.sh --run src/vs/platform/agentHost/test/node/copilotFailureTelemetry.test.ts --run src/vs/platform/agentHost/test/node/copilotAgent.test.ts --grep 'CopilotFailureTelemetry|reports .*Copilot client startup failure'
  • 6 focused tests passed
  • git diff --check

(Written by Copilot)

Add bounded startup cause, resource, and exit-code telemetry, including SDK timeouts and permission failures.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings August 7, 2026 22:43

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

Adds bounded telemetry diagnostics for Agent Host Copilot startup failures.

Changes:

  • Classifies startup causes, resources, and safe exit codes.
  • Recognizes SDK startup timeouts and permission failures.
  • Adds focused telemetry tests.
Show a summary per file
File Description
copilotFailureTelemetry.ts Adds startup-failure classification and telemetry fields.
copilotFailureTelemetry.test.ts Tests timeout lifecycle classification.
copilotAgent.test.ts Tests bounded startup diagnostics.

Review details

Tip

Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Balanced

if (normalizedMessage.includes('runtime.node') || normalizedMessage.includes('runtime.win32') || normalizedMessage.includes('native addon "runtime"')) {
return 'runtime';
}
if (normalizedMessage.includes('sandbox') || normalizedMessage.includes('mxc') || normalizedMessage.includes('wxc')) {
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.

2 participants