Skip to content
This repository was archived by the owner on May 20, 2026. It is now read-only.

Commit 141a6e1

Browse files
authored
Disable debug log aggregation by default
2 parents a175356 + 6d90272 commit 141a6e1

5 files changed

Lines changed: 27 additions & 0 deletions

File tree

package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3182,6 +3182,15 @@
31823182
"preview",
31833183
"onExp"
31843184
]
3185+
},
3186+
"github.copilot.agentDebugLog.enabled": {
3187+
"type": "boolean",
3188+
"default": false,
3189+
"markdownDescription": "%github.copilot.config.agentDebugLog.enabled%",
3190+
"tags": [
3191+
"preview",
3192+
"onExp"
3193+
]
31853194
}
31863195
}
31873196
},

package.nls.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@
381381
"github.copilot.config.instantApply.shortContextLimit": "Token limit for short context instant apply.",
382382
"github.copilot.config.summarizeAgentConversationHistoryThreshold": "Threshold for compacting agent conversation history.",
383383
"github.copilot.config.agentHistorySummarizationMode": "Mode for agent history summarization.",
384+
"github.copilot.config.agentDebugLog.enabled": "When enabled, collect agent request information (tool calls, LLM requests, token usage, and errors) for viewing and troubleshooting in VS Code. Requires window reload to take effect.",
384385
"github.copilot.config.backgroundCompaction": "Enable background compaction of conversation history.",
385386
"github.copilot.config.agentHistorySummarizationWithPromptCache": "Use prompt caching for agent history summarization.",
386387
"github.copilot.config.agentHistorySummarizationForceGpt41": "Force GPT-4.1 for agent history summarization.",

src/extension/agentDebug/node/agentDebugEventCollector.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6+
import { ConfigKey, IConfigurationService } from '../../../platform/configuration/common/configurationService';
67
import { ICustomInstructionsService } from '../../../platform/customInstructions/common/customInstructionsService';
78
import { INSTRUCTION_FILE_EXTENSION } from '../../../platform/customInstructions/common/promptTypes';
89
import { CapturingToken } from '../../../platform/requestLogger/common/capturingToken';
910
import { IRequestLogger, LoggedInfoKind, LoggedRequestKind } from '../../../platform/requestLogger/node/requestLogger';
11+
import { IExperimentationService } from '../../../platform/telemetry/common/nullExperimentationService';
1012
import { ITrajectoryLogger } from '../../../platform/trajectory/common/trajectoryLogger';
1113
import type { ITrajectoryStep } from '../../../platform/trajectory/common/trajectoryTypes';
1214
import { Disposable } from '../../../util/vs/base/common/lifecycle';
@@ -48,9 +50,15 @@ export class AgentDebugEventCollector extends Disposable {
4850
@ITrajectoryLogger private readonly _trajectoryLogger: ITrajectoryLogger,
4951
@ICustomInstructionsService private readonly _customInstructionsService: ICustomInstructionsService,
5052
@IToolResultContentRenderer private readonly _toolResultRenderer: IToolResultContentRenderer,
53+
@IConfigurationService private readonly _configurationService: IConfigurationService,
54+
@IExperimentationService private readonly _experimentationService: IExperimentationService,
5155
) {
5256
super();
5357

58+
if (!this._configurationService.getExperimentBasedConfig(ConfigKey.AgentDebugLogEnabled, this._experimentationService)) {
59+
return;
60+
}
61+
5462
// --- IRequestLogger subscription ---
5563
this._register(this._requestLogger.onDidChangeRequests(() => {
5664
this._syncFromRequestLogger();

src/extension/trajectory/vscode-node/chatDebugLogProvider.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
import { Raw } from '@vscode/prompt-tsx';
77
import * as vscode from 'vscode';
88
import { ChatFetchResponseType } from '../../../platform/chat/common/commonTypes';
9+
import { ConfigKey, IConfigurationService } from '../../../platform/configuration/common/configurationService';
910
import { ILogService } from '../../../platform/log/common/logService';
1011
import { messageToMarkdown } from '../../../platform/log/common/messageStringify';
1112
import { isOpenAiFunctionTool } from '../../../platform/networking/common/fetch';
1213
import { IRequestLogger, LoggedInfoKind, LoggedRequestKind, type LoggedRequest } from '../../../platform/requestLogger/node/requestLogger';
14+
import { IExperimentationService } from '../../../platform/telemetry/common/nullExperimentationService';
1315
import { ITrajectoryLogger, ITrajectoryStep } from '../../../platform/trajectory/common/trajectoryLogger';
1416
import { Disposable } from '../../../util/vs/base/common/lifecycle';
1517
import { generateUuid } from '../../../util/vs/base/common/uuid';
@@ -570,9 +572,15 @@ export class ChatDebugLogProviderContribution extends Disposable implements IExt
570572
@IAgentDebugEventService private readonly _debugEventService: IAgentDebugEventService,
571573
@ILogService private readonly _logService: ILogService,
572574
@IRequestLogger private readonly _requestLogger: IRequestLogger,
575+
@IConfigurationService private readonly _configurationService: IConfigurationService,
576+
@IExperimentationService private readonly _experimentationService: IExperimentationService,
573577
) {
574578
super();
575579

580+
if (!this._configurationService.getExperimentBasedConfig(ConfigKey.AgentDebugLogEnabled, this._experimentationService)) {
581+
return;
582+
}
583+
576584
if (typeof vscode.chat?.registerChatDebugLogProvider !== 'function') {
577585
this._logService.info('[ChatDebugLogProvider] Chat debug API not available, skipping registration');
578586
return;

src/platform/configuration/common/configurationService.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -981,6 +981,7 @@ export namespace ConfigKey {
981981
export const AutomaticRenameSuggestions = defineSetting('renameSuggestions.triggerAutomatically', ConfigType.Simple, true);
982982
export const TerminalToDebuggerEnabled = defineSetting('chat.copilotDebugCommand.enabled', ConfigType.Simple, true);
983983
export const CodeSearchAgentEnabled = defineSetting<boolean>('chat.codesearch.enabled', ConfigType.Simple, false);
984+
export const AgentDebugLogEnabled = defineSetting<boolean>('agentDebugLog.enabled', ConfigType.ExperimentBased, false);
984985
export const ClaudeAgentEnabled = defineSetting<boolean>('chat.claudeAgent.enabled', ConfigType.Simple, true);
985986
export const ClaudeAgentAllowDangerouslySkipPermissions = defineSetting<boolean>('chat.claudeAgent.allowDangerouslySkipPermissions', ConfigType.Simple, false);
986987
export const InlineEditsEnabled = defineSetting<boolean>('nextEditSuggestions.enabled', ConfigType.ExperimentBased, true);

0 commit comments

Comments
 (0)