Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions extensions/copilot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4170,6 +4170,15 @@
"onExp"
]
},
"github.copilot.chat.claudeSonnet5Prompt.enabled": {
"type": "boolean",
"default": false,
"markdownDescription": "%github.copilot.config.claudeSonnet5Prompt.enabled%",
"tags": [
"experimental",
"onExp"
]
},
"github.copilot.chat.gpt55GetChangedFilesTool.enabled": {
"type": "boolean",
"default": true,
Expand Down
1 change: 1 addition & 0 deletions extensions/copilot/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@
"github.copilot.config.responsesApi.promptCacheBreakpoint.enabled": "Enables explicit prompt cache breakpoint markers for the Responses API.",
"github.copilot.config.updated53CodexPrompt.enabled": "Enables the updated prompt for gpt-5.3-codex model.",
"github.copilot.config.claudeOpus5Prompt.enabled": "Enables the updated system prompt tuned for the Claude Opus 5 model.",
"github.copilot.config.claudeSonnet5Prompt.enabled": "Enables the updated system prompt tuned for the Claude Sonnet 5 model.",
"github.copilot.config.gpt55GetChangedFilesTool.enabled": "Enables the Get Changed Files tool for gpt-5.5 models.",
"github.copilot.config.gpt56Verbosity.enabled": "Sets the response verbosity to low for gpt-5.6 models.",
"github.copilot.config.gemini3GetChangedFilesTool.enabled": "Enables the Get Changed Files tool for gemini-3 models.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,25 @@ class Claude46SonnetPrompt extends Claude46OptimizedBasePrompt {
}
}

/**
* Prompt for Claude Sonnet 5, extending the optimized Sonnet 4.6 prompt with a scope-discipline
* paragraph. Sonnet 5 explores and explains more than Sonnet 4.6 on the same task, which raises
* both its score and its token cost. Constraining scope alone regresses cases where a backwards
* compatibility shim looks like adjacent work, so the interface-preservation clause is required
* alongside it.
*/
class ClaudeSonnet5Prompt extends Claude46SonnetPrompt {
protected override renderAppendedInstructions() {
return <Tag name='scopeDiscipline'>
Do exactly what was asked - don't extend scope to new adjacent code, tests, examples, or unrelated files unless the task explicitly includes them.<br />
But always preserve existing public interfaces: never remove or change the signature of module-level functions, exported names, or class methods that other code might depend on, unless explicitly told to.<br />
If you think adjacent work is needed, mention it rather than doing it.<br />
Be direct and minimal on file reads and editor-tool calls; spend your reasoning on design decisions, debugging, and writing code.<br />
Keep your responses to the user concise - a few sentences explaining what you did and why is enough; the work happens in tool calls, not in prose.<br />
</Tag>;
}
}

/** Opus-specific optimized prompt for Claude 4.6. */
class Claude46OpusPrompt extends Claude46OptimizedBasePrompt {
protected override renderExplorationGuidance(_tools: ReturnType<typeof detectToolCapabilities>) {
Expand Down Expand Up @@ -541,6 +560,10 @@ class AnthropicPromptResolver implements IAgentPrompt {
return endpoint.model.startsWith('claude-sonnet') || endpoint.family.startsWith('claude-sonnet');
}

private isSonnet5(endpoint: IChatEndpoint): boolean {
return endpoint.model.startsWith('claude-sonnet-5') || endpoint.family.startsWith('claude-sonnet-5');
}

private isHaiku(endpoint: IChatEndpoint): boolean {
return endpoint.model.startsWith('claude-haiku') || endpoint.family.startsWith('claude-haiku');
}
Expand All @@ -556,6 +579,9 @@ class AnthropicPromptResolver implements IAgentPrompt {
if (this.isClaude45(endpoint)) {
return Claude45DefaultPrompt;
}
if (this.isSonnet5(endpoint) && this.configurationService.getExperimentBasedConfig(ConfigKey.ClaudeSonnet5PromptEnabled, this.experimentationService)) {
return ClaudeSonnet5Prompt;
}
if (this.isSonnet(endpoint)) {
return Claude46SonnetPrompt;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,8 @@ export namespace ConfigKey {
export const Updated53CodexPromptEnabled = defineSetting<boolean>('chat.updated53CodexPrompt.enabled', ConfigType.ExperimentBased, true);
/** Enable updated prompt for Claude Opus 5 model */
export const ClaudeOpus5PromptEnabled = defineSetting<boolean>('chat.claudeOpus5Prompt.enabled', ConfigType.ExperimentBased, false);
/** Enable updated prompt for Claude Sonnet 5 model */
export const ClaudeSonnet5PromptEnabled = defineSetting<boolean>('chat.claudeSonnet5Prompt.enabled', ConfigType.ExperimentBased, false);
/** Enable get_changed_files tool for GPT-5.5 models */
export const EnableGpt55GetChangedFilesTool = defineSetting<boolean>('chat.gpt55GetChangedFilesTool.enabled', ConfigType.ExperimentBased, true);
/** Enable low verbosity for GPT-5.6 models. */
Expand Down
Loading