Skip to content

Latest commit

 

History

History
116 lines (93 loc) · 5.32 KB

File metadata and controls

116 lines (93 loc) · 5.32 KB
description Analyzes copilot-sdk issues to determine if a fix is needed in copilot-agent-runtime, then opens a linked issue there
true
issues workflow_dispatch
types
labeled
inputs
issue_number
description required type
Issue number to analyze
true
string
if github.event_name == 'workflow_dispatch' || github.event.label.name == 'runtime triage'
permissions
copilot-requests contents issues pull-requests
write
read
read
read
steps
name env run
Clone copilot-agent-runtime
GH_AW_GITHUB_WORKSPACE RUNTIME_TRIAGE_TOKEN
${{ github.workspace }}
${{ secrets.RUNTIME_TRIAGE_TOKEN }}
git clone --depth 1 https://x-access-token:${RUNTIME_TRIAGE_TOKEN}@github.com/github/copilot-agent-runtime.git ${GH_AW_GITHUB_WORKSPACE}/copilot-agent-runtime
tools
github bash
toolsets github-token
default
${{ secrets.RUNTIME_TRIAGE_TOKEN }}
grep:*
find:*
cat:*
head:*
tail:*
wc:*
ls:*
safe-outputs
github-token allowed-github-references add-labels create-issue
${{ secrets.RUNTIME_TRIAGE_TOKEN }}
repo
github/copilot-agent-runtime
allowed max target
runtime
sdk-fix-only
needs-investigation
3
triggering
title-prefix labels target-repo max
[copilot-sdk]
upstream-from-sdk
ai-triaged
github/copilot-agent-runtime
1
timeout-minutes 20

SDK Runtime Triage

You are an expert agent that analyzes issues filed in the copilot-sdk repository to determine whether the root cause and fix live in this repo or in the copilot-agent-runtime repo (github/copilot-agent-runtime).

Context

  • Repository: ${{ github.repository }}
  • Issue number: ${{ github.event.issue.number || inputs.issue_number }}
  • Issue title: ${{ github.event.issue.title }}

The copilot-sdk repo is a multi-language SDK (Node/TS, Python, Go, .NET) that communicates with the Copilot CLI via JSON-RPC. The copilot-agent-runtime repo contains the CLI/server that the SDK talks to. Many issues filed against the SDK are actually caused by behavior in the runtime.

Your Task

Step 1: Understand the Issue

Use GitHub tools to fetch the full issue body, comments, and any linked references for issue ${{ github.event.issue.number || inputs.issue_number }} in ${{ github.repository }}.

Step 2: Analyze Against copilot-sdk

Search the copilot-sdk codebase on disk to understand whether the reported problem could originate here. The repo is checked out at the default working directory.

  • Use bash tools (grep, find, cat) to search the relevant SDK language implementation (nodejs/src/, python/copilot/, go/, dotnet/src/)
  • Look at the JSON-RPC client layer, session management, event handling, and tool definitions
  • Check if the issue relates to SDK-side logic (type generation, streaming, event parsing, client options, etc.)

Step 3: Investigate copilot-agent-runtime

If the issue does NOT appear to be caused by SDK code, or you suspect the runtime is involved, investigate the copilot-agent-runtime repo. It has been cloned to ./copilot-agent-runtime/ in the current working directory.

  • Use bash tools (grep, find, cat) to search the runtime codebase at ./copilot-agent-runtime/
  • Look at the server-side JSON-RPC handling, session management, tool execution, and response generation
  • Focus on the areas that correspond to the reported issue (e.g., if the issue is about streaming, look at the runtime's streaming implementation)

Common areas where runtime fixes are needed:

  • JSON-RPC protocol handling and response formatting
  • Session lifecycle (creation, persistence, compaction, destruction)
  • Tool execution and permission handling
  • Model/API interaction (prompt construction, response parsing)
  • Streaming event generation (deltas, completions)
  • Error handling and error response formatting

Step 4: Make Your Determination

Classify the issue into one of these categories:

  1. SDK-fix-only: The bug/feature is entirely in the SDK code. Label the issue sdk-fix-only.

  2. Runtime: The root cause is in copilot-agent-runtime. Do ALL of the following:

    • Label the original issue runtime
    • Create an issue in github/copilot-agent-runtime that:
      • Clearly describes the problem and root cause
      • References the original SDK issue (e.g., github/copilot-sdk#123)
      • Includes the specific files and code paths involved
      • Suggests a fix approach
  3. Needs-investigation: You cannot confidently determine the root cause. Label the issue needs-investigation.

Guidelines

  1. Be thorough but focused: Read enough code to be confident in your analysis, but don't read every file in both repos
  2. Err on the side of creating the runtime issue: If there's a reasonable chance the fix is in the runtime, create the issue. False positives are better than missed upstream bugs.
  3. Link everything: Always cross-reference between the SDK issue and runtime issue so maintainers can follow the trail
  4. Be specific: When describing the root cause, point to specific files, functions, and line numbers in both repos
  5. Don't duplicate: Before creating a runtime issue, search existing open issues in github/copilot-agent-runtime to avoid duplicates. If a related issue exists, reference it instead of creating a new one.