Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
b169da7
Chat OTel: enrich Claude agent spans with github.copilot.* attributes
zhichli May 27, 2026
6516219
Chronicle: fold search_subagent trajectory into parent session (#318491)
digitarald May 27, 2026
c317ef0
Fix BYOK invalid stateful marker retries (#317292)
PenguinDOOM May 27, 2026
d96a3c8
Chronicle: handle undefined CapturingToken in execution_subagent (#31…
vijayupadya May 27, 2026
3ff4420
fix: prevent signed-out users from seeing Copilot control-manifest en…
vritant24 May 27, 2026
288be98
[cherry-pick] OSS tool: update third-party notices (v1.122) (#318500)
vs-code-engineering[bot] May 27, 2026
30cd9e6
delete extra lines
vritant24 May 27, 2026
f7b0ff8
[cherry-pick] [OSS Tool] OSS License Fix: add copyright for `@github/…
vs-code-engineering[bot] May 27, 2026
966934a
Merge branch 'main' into agents/investigate-upgrade-models-issue
vritant24 May 27, 2026
55224ab
Fix layering: inject extractToolParameters via state; tighten truncate
zhichli May 27, 2026
72c29a5
CAPI package update (#318481)
osortega May 27, 2026
02ec884
Add /chronicle:improve prompt for data-driven instructions refinement…
digitarald May 27, 2026
178fb65
Merge pull request #318472 from microsoft/zhichli/otel-claude
zhichli May 27, 2026
9254a74
Perf: Dedupe tool-definition JSON across telemetry/OTel sites (#318477)
dmitrivMS May 27, 2026
0baa8cd
fix(mcp): use synchronous child.kill('SIGTERM') in killPolite() to av…
Copilot May 27, 2026
25c42be
Agent Picker is not pre-selected when creating a new Agent Host sessi…
aeschli May 27, 2026
c53e1ff
Revert "fix(mcp): use synchronous child.kill('SIGTERM') in killPolite…
vritant24 May 27, 2026
73d268a
Merge pull request #318509 from microsoft/agents/investigate-upgrade-…
vritant24 May 27, 2026
d1388f2
Fix chat notification outline to match chat input focus ring (#318471)
dmitrivMS May 27, 2026
40a9d56
nes: enable cursor jump by default (#318426)
ulugbekna May 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions cglicenses.json
Original file line number Diff line number Diff line change
Expand Up @@ -1094,6 +1094,80 @@
"name": "@nodelib/fs.scandir",
"fullLicenseTextUri": "https://raw.githubusercontent.com/nodelib/nodelib/ba122bd81aadd0a4fa7340ef2cfaabf62984bf1d/LICENSE"
},
{
// Reason: LICENSE.md at github/copilot-cli does not contain a copyright statement.
// Copyright holder sourced from the GitHub organization (github = GitHub, Inc.).
"name": "@github/copilot-linuxmusl-arm64",
"prependLicenseText": [
"Copyright (c) GitHub, Inc. All rights reserved."
]
},
{
// Reason: LICENSE.md at github/copilot-cli does not contain a copyright statement.
// Copyright holder sourced from the GitHub organization (github = GitHub, Inc.).
"name": "@github/copilot-linuxmusl-x64",
"prependLicenseText": [
"Copyright (c) GitHub, Inc. All rights reserved."
]
},
{
// Reason: NPM package does not include a repository URL, so the OSS tool cannot
// auto-resolve a license source. The package tarball ships a standard MIT LICENSE.md
// authored by Microsoft Corporation.
"name": "@microsoft/mxc-sdk",
"fullLicenseText": [
"MIT License",
"",
"Copyright (c) Microsoft Corporation.",
"",
"Permission is hereby granted, free of charge, to any person obtaining a copy",
"of this software and associated documentation files (the \"Software\"), to deal",
"in the Software without restriction, including without limitation the rights",
"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell",
"copies of the Software, and to permit persons to whom the Software is",
"furnished to do so, subject to the following conditions:",
"",
"The above copyright notice and this permission notice shall be included in all",
"copies or substantial portions of the Software.",
"",
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR",
"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE",
"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,",
"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE",
"SOFTWARE"
]
},
{
// Reason: NPM package's repository URL points to microsoft/vscode-packages, which is
// a private/internal Microsoft repository (returns 404 publicly). The package tarball
// ships a standard MIT LICENSE authored by Microsoft Corporation.
"name": "@vscode/diff",
"fullLicenseText": [
"MIT License",
"",
"Copyright (c) Microsoft Corporation.",
"",
"Permission is hereby granted, free of charge, to any person obtaining a copy",
"of this software and associated documentation files (the \"Software\"), to deal",
"in the Software without restriction, including without limitation the rights",
"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell",
"copies of the Software, and to permit persons to whom the Software is",
"furnished to do so, subject to the following conditions:",
"",
"The above copyright notice and this permission notice shall be included in all",
"copies or substantial portions of the Software.",
"",
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR",
"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE",
"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,",
"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE",
"SOFTWARE"
]
},
{
// Reason: License in README links to oss.ninja/mit/developit which has no copyright statement.
// Author is Jason Miller (https://github.com/developit).
Expand Down
4 changes: 2 additions & 2 deletions cli/ThirdPartyNotices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6183,7 +6183,7 @@ OTHER DEALINGS IN THE SOFTWARE.

---------------------------------------------------------

openssl 0.10.79 - Apache-2.0
openssl 0.10.80 - Apache-2.0
https://github.com/rust-openssl/rust-openssl

Copyright 2011-2017 Google Inc.
Expand Down Expand Up @@ -6262,7 +6262,7 @@ DEALINGS IN THE SOFTWARE.

---------------------------------------------------------

openssl-sys 0.9.115 - MIT
openssl-sys 0.9.116 - MIT
https://github.com/rust-openssl/rust-openssl

The MIT License (MIT)
Expand Down
5 changes: 5 additions & 0 deletions extensions/copilot/assets/prompts/chronicle-improve.prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
name: chronicle:improve
description: Improve agent instructions based on friction patterns in your session history
---
Analyze my recent chat session history for friction patterns and suggest improvements to my agent instructions file. Use the **chronicle** skill — it documents the `copilot_sessionStoreSql` tool, the session-store schema, and the Improve workflow for detecting repeated failures, user corrections, and recurring friction across sessions, then proposing data-grounded additions to the project's agent instructions.
34 changes: 34 additions & 0 deletions extensions/copilot/assets/prompts/skills/chronicle/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ Analysis dimensions to explore:

If the session store has little data, acknowledge that and suggest features to try based on what configuration you found in the workspace.

When recommending custom skills, agents, or instructions as a tip, consult the **agent-customization** skill for proper file creation patterns — don't give vague "create a custom skill" advice without actionable file structure guidance.

### Cost Tips

When the user asks for cost tips, ways to reduce token usage, or how to lower Copilot spend (e.g. `/chronicle:cost-tips`):
Expand Down Expand Up @@ -170,6 +172,38 @@ Give the user 3-5 specific, actionable tips. Each tip should:

If the session store has little data (e.g., cloud store is empty, or only a handful of local sessions), say so plainly and offer 2-3 non-obvious cost-saving habits anchored in available features rather than fabricating findings. If the user is on local-only storage, end by noting that enabling `chat.sessionSync.enabled` unlocks per-event token analysis for sharper future tips.

### Improve

When the user asks to improve their agent instructions based on session history (e.g. `/chronicle:improve`):

**Step 1: Read the current instructions file**

Read whichever instructions file the project uses (`.github/copilot-instructions.md` or `AGENTS.md`) to understand what already exists.

If the file does **not** exist, you will create it. In that case, also analyze the codebase first — consult the **init** skill and follow its codebase exploration approach. Combine that analysis with the session history findings from Step 2 to produce a comprehensive instructions file.

**Step 2: Investigate session history**

Use `copilot_sessionStoreSql` to explore. Scope all queries to sessions from the current repository or working directory.

Start by getting an overview of recent sessions for this repo, then dig deeper. You're looking for **friction** — signals that the agent misunderstood something or the user had to course-correct:

- **User messages that correct or redirect** — read the actual conversation turns of suspicious sessions. Look for areas where the user got frustrated.
- **Dev loop struggles** — did the agent have trouble with tests, linting, building, or type checking? Look for repeated failed commands, test retries, or build errors that required multiple attempts.
- **Patterns across sessions** — does the same kind of mistake recur?

Use your judgment on what queries to run. Drill into specific sessions when something looks interesting — read the actual turn-by-turn conversation to understand what went wrong.

**Step 3: Present recommendations**

Before presenting, consult the **agent-customization** skill for proper file conventions, content principles (link don't embed, minimal, concise), and anti-patterns — this frames how recommendations should be written.

Based on what you find, succinctly present 3-5 recommendations. Explain both the issue you found and what custom instructions can address it.

Focus on project-specific patterns, not generic advice. Only suggest instructions that address real problems found in the data that happened more than once.

After presenting all recommendations, ask the user which ones they'd like to apply. Then make only the approved edits to the single existing instructions file (or create `AGENTS.md` if none exists).

### Search

When the user asks to search, find, or look up past sessions by keyword (e.g. `/chronicle:search <query>`):
Expand Down
6 changes: 4 additions & 2 deletions extensions/copilot/assets/prompts/skills/init/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ When complete, print a table of the added or modified chat customization files,
3. **Generate or merge**
- New file: Prefer AGENTS.md over `.github/copilot-instructions.md`. If the user already has one of these files, update it instead of creating a new one.
- Existing file: Preserve valuable content, update outdated sections, remove duplication
- Follow the guidelines in the `agent-customization` skill:
- Follow the guidelines in the `agent-customization` skill:
1. **Link, don't embed** principle. Do not copy existing documentation that exists in the workspace, link to them with a Markdown link instead.
2. **Minimal by default**: Only what's relevant and can not be easely discovered by an agent should be included. Link to other documentation for details.
2. **Minimal by default**: Only what's relevant and cannot be easily discovered by an agent should be included. Link to other documentation for details.
3. **Concise and actionable**: Every line should guide behavior

4. **Iterate**
- Ask for feedback on unclear or incomplete sections
- If the workspace is complex, suggest creating separate instructions files or skills for specific areas (e.g., frontend, backend, tests)

Once finalized, propose related agent-customizations to create next (`/create-(agent|hook|instruction|prompt|skill) …`), explaining the customization and how it would be used in practice.

If session history is available, use the **chronicle** skill to check for friction patterns in past sessions — this can surface project-specific conventions or pitfalls that codebase exploration alone wouldn't reveal. Mention `/chronicle:improve` to the user as a way to iteratively refine instructions over time.
8 changes: 4 additions & 4 deletions extensions/copilot/chat-lib/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion extensions/copilot/chat-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dependencies": {
"@microsoft/tiktokenizer": "^1.0.10",
"@sinclair/typebox": "^0.34.41",
"@vscode/copilot-api": "^0.4.0",
"@vscode/copilot-api": "^0.4.1",
"@vscode/l10n": "^0.0.18",
"@vscode/prompt-tsx": "^0.4.0-alpha.8",
"@vscode/tree-sitter-wasm": "0.0.5-php.2",
Expand Down
17 changes: 17 additions & 0 deletions extensions/copilot/docs/monitoring/agent_monitoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,11 @@ copilot-chat invoke_agent claude [~33s]
| `gen_ai.usage.output_tokens` | `1100` |
| `gen_ai.usage.cache_read.input_tokens` | `64062` |
| `gen_ai.usage.cache_creation.input_tokens` | `39629` |
| `github.copilot.agent.type` | `builtin` |
| `github.copilot.git.repository` | `https://github.com/microsoft/vscode.git` |
| `github.copilot.git.branch` | `main` |
| `github.copilot.git.commit_sha` | `deadbeef...` |
| `github.copilot.github.org` | `microsoft` |
| `copilot_chat.turn_count` | `8` |
| `copilot_chat.total_cost_usd` | `0.067` (session-wide, includes subagents) |
| `copilot_chat.chat_session_id` | VS Code session ID |
Expand All @@ -653,6 +658,18 @@ copilot-chat invoke_agent claude [~33s]

**`execute_tool`** — one span per tool invocation. When the tool is `Agent` (subagent), child `chat` and `execute_tool` spans are nested underneath, giving full subagent visibility.

| Attribute | Requirement | Example |
|---|---|---|
| `gen_ai.operation.name` | Required | `execute_tool` |
| `gen_ai.tool.name` | Required | `Edit` |
| `github.copilot.tool.parameters.edit_type` | Edit tools (`Write`, `Edit`, `MultiEdit`, `NotebookEdit`) | `create` \| `str_replace` \| `update` |
| `github.copilot.tool.parameters.mcp_server_name_hash` | MCP tools | SHA-256 hex of server name |
| `github.copilot.tool.parameters.mcp_tool_name` | MCP tools | `search_issues` |
| `github.copilot.tool.parameters.command` | Shell tools (`Bash`), opt-in (captureContent) | `npm test` (truncated to 256 chars) |
| `github.copilot.tool.parameters.file_path` | File tools (`Read`, `Edit`, `MultiEdit`, `Write`, `NotebookEdit`), opt-in (captureContent) | `/src/app.ts` |
| `github.copilot.tool.parameters.mcp_server_name` | MCP tools, opt-in (captureContent) | `github` |
| `gen_ai.tool.call.arguments` | Opt-in (captureContent) | `{"file_path":"/src/app.ts",...}` |

**`execute_hook`** — one span per Claude hook execution (e.g., `Stop` hooks).

| Attribute | Requirement | Example |
Expand Down
4 changes: 2 additions & 2 deletions extensions/copilot/docs/monitoring/agent_monitoring_arch.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,8 @@ return this._otel.startActiveSpan('invoke_agent child', { parentTraceContext: pa
| Namespace | Used By | Examples |
|---|---|---|
| `gen_ai.*` | All agents (standard) | `gen_ai.operation.name`, `gen_ai.usage.input_tokens` |
| `copilot_chat.*` | Extension-specific | `copilot_chat.session_id`, `copilot_chat.chat_session_id` |
| `github.copilot.*` | CLI SDK internal | `github.copilot.cost`, `github.copilot.aiu` |
| `copilot_chat.*` | Extension-specific (legacy; several keys dual-emit alongside `github.copilot.*`) | `copilot_chat.session_id`, `copilot_chat.chat_session_id` |
| `github.copilot.*` | Canonical Copilot namespace — extension-emitted enrichment (foreground agent, Claude agent, CLI bridge) + CLI SDK internal metrics | `github.copilot.agent.type`, `github.copilot.git.repository`, `github.copilot.tool.parameters.edit_type`, `github.copilot.hook.decision`, `github.copilot.cost`, `github.copilot.aiu` |
| `claude_code.*` | Claude subprocess | `claude_code.token.usage`, `claude_code.cost.usage` |

---
Expand Down
8 changes: 4 additions & 4 deletions extensions/copilot/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions extensions/copilot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3222,7 +3222,7 @@
},
"github.copilot.nextEditSuggestions.extendedRange": {
"type": "boolean",
"default": false,
"default": true,
"tags": [
"nextEditSuggestions",
"onExp"
Expand Down Expand Up @@ -6636,6 +6636,13 @@
"local"
]
},
{
"path": "./assets/prompts/chronicle-improve.prompt.md",
"when": "github.copilot.sessionSearch.enabled",
"sessionTypes": [
"local"
]
},
{
"path": "./assets/prompts/chronicle-reindex.prompt.md",
"when": "github.copilot.sessionSearch.enabled",
Expand Down Expand Up @@ -6902,7 +6909,7 @@
"@opentelemetry/sdk-trace-node": "^2.5.1",
"@opentelemetry/semantic-conventions": "^1.39.0",
"@sinclair/typebox": "^0.34.41",
"@vscode/copilot-api": "^0.4.0",
"@vscode/copilot-api": "^0.4.1",
"@vscode/extension-telemetry": "^1.5.1",
"@vscode/l10n": "^0.0.18",
"@vscode/prompt-tsx": "^0.4.0-alpha.8",
Expand Down
6 changes: 3 additions & 3 deletions extensions/copilot/src/extension/byok/node/openAIEndpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ export class OpenAIEndpoint extends ChatEndpoint {
const zdr = !!this.modelMetadata.zeroDataRetentionEnabled;
// When ZDR is on the server refuses to retain responses, so we must
// not chain via `previous_response_id` and must not ask it to `store`.
options.ignoreStatefulMarker = zdr;
options.ignoreStatefulMarker = options.ignoreStatefulMarker || zdr;
const body = super.createRequestBody(options);
body.store = !zdr;
body.n = undefined;
Expand Down Expand Up @@ -378,8 +378,8 @@ export class OpenAIEndpoint extends ChatEndpoint {
}

public override async makeChatRequest2(options: IMakeChatRequestOptions, token: CancellationToken): Promise<ChatResponse> {
// Apply ignoreStatefulMarker: false for initial request
const modifiedOptions: IMakeChatRequestOptions = { ...options, ignoreStatefulMarker: false };
// Use ignoreStatefulMarker: false as the initial request default; the parent retry flow can override it on InvalidStatefulMarker retries.
const modifiedOptions: IMakeChatRequestOptions = { ...options, ignoreStatefulMarker: options.ignoreStatefulMarker ?? false };
const response = await super.makeChatRequest2(modifiedOptions, token);
return hydrateBYOKErrorMessages(response);
}
Expand Down
Loading
Loading