Skip to content

Commit f8efcd8

Browse files
authored
gpt-5-codex prompt improvements (#1177)
* gpt-5-codex prompt improvements * update baseline
1 parent 4cd0113 commit f8efcd8

13 files changed

+71
-72
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3031,7 +3031,7 @@
30313031
},
30323032
"github.copilot.chat.gpt5CodexAlternatePrompt": {
30333033
"type": "string",
3034-
"default": "default",
3034+
"default": "codex",
30353035
"tags": [
30363036
"experimental",
30373037
"onExp"

src/extension/intents/node/agentIntent.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ export const getAgentTools = (instaService: IInstantiationService, request: vsco
115115
allowTools[ToolName.RunTests] = await testService.hasAnyTests();
116116
allowTools[ToolName.CoreRunTask] = tasksService.getTasks().length > 0;
117117

118+
if (model.family === 'gpt-5-codex') {
119+
allowTools[ToolName.CoreManageTodoList] = false;
120+
allowTools[ToolName.Think] = false;
121+
}
122+
123+
allowTools[ToolName.EditFilesPlaceholder] = false;
118124
if (request.tools.get(ContributedToolName.EditFilesPlaceholder) === false) {
119125
allowTools[ToolName.ApplyPatch] = false;
120126
allowTools[ToolName.EditFile] = false;

src/extension/prompts/node/agent/agentPrompt.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -781,12 +781,7 @@ export class KeepGoingReminder extends PromptElement<IKeepGoingReminderProps> {
781781
You are a highly capable and autonomous agent, and you can definitely solve this problem without needing to ask the user for further input.<br />
782782
</>;
783783
} else if (this.props.modelFamily === 'gpt-5-codex') {
784-
return <>
785-
You are an agent—keep going until the user's query is completely resolved before ending your turn. ONLY stop if solved or genuinely blocked.<br />
786-
Take action when possible; the user expects you to do useful work without unnecessary questions.<br />
787-
Avoid repetition across turns: don't restate unchanged plans or sections (like the todo list) verbatim; provide delta updates or only the parts that changed.<br />
788-
Requirements coverage: Read the user's ask in full and think carefully. Do not omit a requirement. If something cannot be done with available tools, note why briefly and propose a viable alternative.<br />
789-
</>;
784+
return undefined;
790785
} else if (this.props.modelFamily?.startsWith('gpt-5') === true) {
791786
return <>
792787
You are an agent—keep going until the user's query is completely resolved before ending your turn. ONLY stop if solved or genuinely blocked.<br />
@@ -809,6 +804,10 @@ export class KeepGoingReminder extends PromptElement<IKeepGoingReminderProps> {
809804
}
810805

811806
function getExplanationReminder(modelFamily: string | undefined, hasTodoTool?: boolean) {
807+
if (modelFamily === 'gpt-5-codex') {
808+
return;
809+
}
810+
812811
const isGpt5Mini = modelFamily === 'gpt-5-mini';
813812
return modelFamily?.startsWith('gpt-5') === true ?
814813
<>

src/extension/prompts/node/base/terminalState.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export class TerminalStatePromptElement extends PromptElement<TerminalStateProps
4242
const resultTerminals = terminals.filter(t => !!t && !activeTaskNames.includes(t.name));
4343

4444
if (resultTerminals.length === 0) {
45-
return 'No terminals found.';
45+
return;
4646
}
4747

4848
const renderTerminals = () => (

src/extension/prompts/node/panel/fileVariable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export class FileVariable extends PromptElement<FileVariableProps, unknown> {
165165
}
166166

167167
if (range) {
168-
const selectionDesc = this.props.description ? `${this.props.description}, this should be the main focus` : `This should be the main focus`;
168+
const selectionDesc = this.props.description ? this.props.description : ``;
169169
const summaryDesc = `User's active file for additional context`;
170170
return (
171171
<>

src/platform/configuration/common/configurationService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ export namespace ConfigKey {
802802

803803
export const EnableAlternateGptPrompt = defineExpSetting<boolean>('chat.alternateGptPrompt.enabled', false);
804804
export const Gpt5AlternatePrompt = defineExpSetting<string>('chat.gpt5AlternatePrompt', 'default');
805-
export const Gpt5CodexAlternatePrompt = defineExpSetting<'default' | 'codex'>('chat.gpt5CodexAlternatePrompt', 'default');
805+
export const Gpt5CodexAlternatePrompt = defineExpSetting<'default' | 'codex'>('chat.gpt5CodexAlternatePrompt', 'codex');
806806
export const GrokCodeAlternatePrompt = defineExpSetting<string>('chat.grokCodeAlternatePrompt', 'default');
807807
export const ExecutePromptEnabled = defineSetting<boolean>('chat.executePrompt.enabled', false);
808808
}

test/outcome/explain-expanded-context-panel.json

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -56,37 +56,37 @@
5656
{
5757
"name": "explain (expanded context) [panel] [typescript] - can explain different editor selections in a single conversation",
5858
"requests": [
59-
"119e64cbfa719b4dafa7cbe08c62a70ac167e630c020f0db25a46a3b8233cebf",
60-
"19b784555139010b032f23a3d954081b382245f2e1bb6ca1f8cc707e2cf25c18",
61-
"273291ac25b1b352c0221fb1b6464a86e8c602ce9fcd4352cfbffe046da43599",
62-
"2c4bc7177913d21c647903072bd255ec15d5e5b8d4e79c75c2c03b175998b952",
63-
"2f56c7667eeb54228256081381738589a3cf10461a81d70c90d3c9b8d395c37b",
64-
"3363c4989599891aa20f8789ba934f4074a80f42e41f9a181ae6a6569bea78ae",
65-
"352eccd6c8a1397cca3912897bcf06197d83bebe8af6ae6a9d6252a8384d34fc",
66-
"483c0a2f878827382e215c6f7d33752e304c443852690ada5411f39a3f2fe3e0",
67-
"5204e7df7a966479a09fa7a62ecb222b98822399989b0c917049cecb2ed89c4a",
68-
"52ff856c5a18eccbebd78d0fe6c1fe930043737cfd650cd539911fc5187c5b3a",
69-
"627f0cedfbf3a31db90def7fdefccf930fdae24db7cec0ee1c70242bb0318f0e",
70-
"7263650cf37de67dcc5291760f4d82ec6dbb5f5cbfbdcf21984ac74026716fef",
71-
"7419b8fb05a21f40095b353d800d0808556e7441365a25fe7322ab61167722c3",
72-
"7a2982b40cb302b86b5993229519717263c1d1f19bc695086a7d0d7f4e9a0203",
73-
"7ba0c5235dbfdc8c24b0fbe4b6f629021a136f15be0a38aeae517fd32ecd23d2",
74-
"83ae67f8e65c60d3e1cf8de4d1aa353330c6ac2c16f0954093f3d2a842904f62",
75-
"8b6e19f0d5c4784e0bc69f3ca07cfd42417d43aa1856c24d84a940f68e6c59f7",
59+
"020bd937db506533684e897c4f01f5de863d23d40afb3f482c0c5510f176061a",
60+
"064fdabd5877fab64f9f77f990ca80523bfc6c559a2084ddc9e806749ede834f",
61+
"06e07f97f11de395feacc8991c17e13e47e9a839b45da6867afb62a182e7e19b",
62+
"158394d9ea9062cc29ec7ac4f29c3a8bcc9bc74b8d1255165bc55f398a6e8531",
63+
"175e92ff9bccd3d947a114324fc3d0a2ac002ed59aa7709d2f72ebeeac610746",
64+
"1d6e105e6c289216149ca05f3717944af89d447ac58fbd60b2b6afc158f8dcea",
65+
"3236f554d01e370962afa9f8a293549c36a0ecfeb5ec1da51681a17e305d3d92",
66+
"388c86cca39be2d552688f34e6f63c691a0df6011070f7b9b65f452d5d73f1c7",
67+
"39a0f63e9d06f4e44b195f91ff0e2f39ddfb248c703b6adc4c8d14b8ac0a39f8",
68+
"4067c2f46837b082ad99744897c1dc1c887b638d226246d716ace4dc63a79a23",
69+
"46d854335d5ead310341466d9893036fa7ffe737d942b29649748a6b3d19d360",
70+
"479898df9ad539873ea9d806950783ab066eb67b5f1018f3b9b0e46294603a3d",
71+
"4881ad4a3c62b100f402a0537d10b5dd7f59a71896cb6b766593637a6fc1a7ce",
72+
"5638a6db8471211cfa5be25f4a3ca0fa60c3a9925423b02ebbfb1e6ca0765301",
73+
"597a23ac238251c26defea79cd9be385c4c7067e436460feaf31ccafc8e10986",
74+
"67ef0ebb953a915b14e3ad868ffd13df4ff8a439ee93a2a0538c20abe4cb7e77",
75+
"7e09cf56c9feba7dc1e36147709ea84c52820a0500b57037d0b30c28c98b7e18",
76+
"8db19a11560615ab64be3f87600d116de5414e0be728accacb68c68b16327861",
77+
"954721092bbdd416d013fdef71d7e58ef90af930698bbde9113ec38146db950b",
7678
"95af02a760ba3f5f1a624782f93524afc39507af6fc42f3790485068880e54f4",
77-
"98b081347e8a9947c8e4ed7004584ab0599accd2e8f60caec827c3c28254b734",
78-
"ad17ed57f45458b4278290ebc609e62f3478ae2cc644afe96d8ea32a1dc5e778",
79-
"b277a16a207900aa7591b9a42c7d0ea8827b3336f14426126e81840c19ebe500",
80-
"bc6afe65883572882d04d1001a4d00cd0023c38d00f8798d2b631ebb9102704a",
81-
"c60d6ea307e9cb47022a3f61e339dc4e20d473cb1bbae9a584ebe9fba260b692",
82-
"d0ae8552fd4239186bbe056f95739b22877b1eaaab918b3ba4584355546fde01",
83-
"d419fb1ef4ce7382b439c9f83327548ce43057d065cb3952b380f45a8879b54e",
84-
"d526fdd826485104576403b850d48c3c4c40d2e9086cf0cc9d51e71f9e611349",
85-
"d91088b9b3190ee8cbffd8603a8f5c2f59530ece8da5cdc175eb86a24dbe8e54",
86-
"dea31e05a52ca1eadaa1304163ac35f8cbacdbd867559bb1d87911f7e08ebf2a",
87-
"e09f4330b1b995a29bff573d4296ecb434154f49af10a2388e1a12b758e552c1",
88-
"fdd0c8d6e09e5d1026ee6f562f27771562f50ccfae06b3040751b29d5f8a5f2a",
89-
"fe5ffa38e1d07c4683ddb391e4b04f53da78c40211be1a1861893137c87bb29e"
79+
"ae172a99e9df73389f5c3a45d461ee5d4b87aa48765aef8f9a3e7aa738665123",
80+
"ba625dfa89f833bda9f54ac7c81fae254d8d6e53c339ca3091db2914bdaca5fe",
81+
"bee7fdeb6359daf03aa23e0d5858c478069b3ebdbb69c84b3a72a8203f96f35d",
82+
"c0c251f2471e6389b2a0593d731c910367837f48fdfe6dd99b0722d19ec28566",
83+
"c57eb08df8755ca463ef94fdfd19816295ded2edcf6738166290fa6430f6a8a1",
84+
"da4be074f0b122bb35e23d64b6495fad9839083c24516f9b92f7ff895b10433a",
85+
"dca48cc775dee90020705073590bb0ec0d879bfaab00fd3c1eb633085dd8ba07",
86+
"ebfa7fe3c9b5a98478e320247b825d95d3c3d3671fe0a1c04041a6e896b60120",
87+
"f10a9dbe4d160c8aa190367fb8f024319059307c4a3b21e35704abdb4d6c6de2",
88+
"f4a571b88e9f3b2fec6ee38c3c6729799bd31e062bceb24c6c54d99595198b31",
89+
"fea9df2fecd35af338875a02f09c5ad67e18af741b0b8d6cb4d93a83b0204ebe"
9090
]
9191
},
9292
{

test/outcome/fix-python-panel.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,61 @@
22
{
33
"name": "fix (python) [panel] [python] - Case #1",
44
"requests": [
5-
"9f5d5269af2e1799384a0ea7303cd08701db547662f55e409757a82d03a10950"
5+
"d171d42a55b27993a2ddcac41253429dd3482e3d532d5ad35de38327d48de365"
66
]
77
},
88
{
99
"name": "fix (python) [panel] [python] - Case #10",
1010
"requests": [
11-
"edc0f9ce3cf54674455f7b0f8559dfc113b2ec0fe3995b6a78866572d64a9eba"
11+
"dd877f6313704c22ae2cb04806669e62aa2bdc82ec60e0449c795484d3d3c342"
1212
]
1313
},
1414
{
1515
"name": "fix (python) [panel] [python] - Case #2",
1616
"requests": [
17-
"d56eb32e697decbae762fb926a45a73a2061fc18b9c3988c24443fef2fefb797"
17+
"503b06fb3c6d05fd4bbbdfc16456a50e9bdb09408f0a187c4a4027346616accd"
1818
]
1919
},
2020
{
2121
"name": "fix (python) [panel] [python] - Case #3",
2222
"requests": [
23-
"64e96cd9d7effb2c185003931f31974b347904357acbef58fa656b1c87ca0522"
23+
"8c4619bf899aed7d48dd5dcb442e97cb32e0f8603c617cf502155e04a0bceafa"
2424
]
2525
},
2626
{
2727
"name": "fix (python) [panel] [python] - Case #4",
2828
"requests": [
29-
"93cc367fbf97073d318f18ab31c541fa0aeaf6edbdb456e0712658c2af6a352e"
29+
"cad7f2fdbc7c5c3f41e60af7338c1b66b23f4401005135e95a14b359f7abe4b0"
3030
]
3131
},
3232
{
3333
"name": "fix (python) [panel] [python] - Case #5",
3434
"requests": [
35-
"ce6f7c5358ac3dbef5b1837412fa8607b94acf9c08523c307ecdfcafa19b5425"
35+
"38bb991e20b414cb83782180c9060105ae2a2480e70a3f4c7af2f59ada10a3d3"
3636
]
3737
},
3838
{
3939
"name": "fix (python) [panel] [python] - Case #6",
4040
"requests": [
41-
"a5d38cccfbb42771bdf60e6db7e947de75f9b674c568da890fffa684193b9b16"
41+
"368bf8dfb93de3aecf0f389194683308ec6519316f4ddce28bf38cec8a5ae948"
4242
]
4343
},
4444
{
4545
"name": "fix (python) [panel] [python] - Case #7",
4646
"requests": [
47-
"b77199a380f33ed314b1e730a8a1212a7545a94029529470d753560297b6268e"
47+
"8960196a1131027d5622917c75569098f5966e2215d953d072cf26d6c0e6dcfd"
4848
]
4949
},
5050
{
5151
"name": "fix (python) [panel] [python] - Case #8",
5252
"requests": [
53-
"b2152a782c894a3004cbd3ab32411b489be11c7cebbedec0a8b83bc6892cbe29"
53+
"258e741416f46e1f936369ae12cde7ed7c644fe0481a1dc4e8a4cd6043aabbed"
5454
]
5555
},
5656
{
5757
"name": "fix (python) [panel] [python] - Case #9",
5858
"requests": [
59-
"b2152a782c894a3004cbd3ab32411b489be11c7cebbedec0a8b83bc6892cbe29"
59+
"258e741416f46e1f936369ae12cde7ed7c644fe0481a1dc4e8a4cd6043aabbed"
6060
]
6161
}
6262
]

test/outcome/fix-typescript-panel.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"name": "fix (typescript) [panel] [typescript] - fix-implements-typescript.conversation.json",
44
"requests": [
5-
"9e54ac2b8f745c13a14a039356c2e2517c254875bc76a2943c54932fab0599ee"
5+
"c6731ca3db4a8aefa15c91dff6b93645e342a8d3b89a9a71811aa4bce2fc9ebc"
66
]
77
}
88
]

test/outcome/notebookedits-bug-reports-json-panel.json

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,7 @@
22
{
33
"name": "notebookEdits (bug reports - json) [panel] - Issue #13868",
44
"requests": [
5-
"03ca2b6e4ed0453348966cfaabbdb91269c7728d9d3cd9c218bee525cc52a5b5",
6-
"1b609f903b5ece0ecead807a8c2148426b68941ed7e4b7969a50572a237f621b",
7-
"1d01161629d00b4c703390a7a0a14837920496608fb0286a0a4c05ca2702f504",
8-
"1d46d98ac20906774d93be4c218fdbb9a8e4745f53a4578ec1637b73d63470d2",
9-
"23a3ab3e7f92cf06046b578b735ead24938fbd18282034fecb1a29fcf1af2be4",
10-
"4c4011a2af65ad4f70f299353eca310dcf8eed5a244424140654d9d98a9e6e59",
11-
"97bb21801487f6d64f727f13a3e78a659ed83c5e2109aeb8f42fabc6116f6a0a",
12-
"dd3345e1936c42bd9eebedc31107378836c16d5eed8b4aa4b3e80414776040bd",
13-
"dfd4e2bc444704a27cc8e9cbf5f180a1682720eea4b716fe2803b83add32fbd1"
5+
"1b609f903b5ece0ecead807a8c2148426b68941ed7e4b7969a50572a237f621b"
146
]
157
}
168
]

0 commit comments

Comments
 (0)