@@ -2797,7 +2797,7 @@ describe("runCodexAppServerAttempt", () => {
27972797 const startRequest = harness . requests . find ( ( request ) => request . method === "thread/start" ) ;
27982798 const startConfig = ( startRequest ?. params as { config ?: Record < string , unknown > } | undefined )
27992799 ?. config ;
2800- expect ( startConfig ?. [ "features.codex_hooks " ] ) . toBe ( true ) ;
2800+ expect ( startConfig ?. [ "features.hooks " ] ) . toBe ( true ) ;
28012801 const preToolUseHooks = startConfig ?. [ "hooks.PreToolUse" ] as
28022802 | Array < { hooks ?: Array < { command ?: string ; timeout ?: number ; type ?: string } > } >
28032803 | undefined ;
@@ -2885,7 +2885,7 @@ describe("runCodexAppServerAttempt", () => {
28852885 const startRequest = harness . requests . find ( ( request ) => request . method === "thread/start" ) ;
28862886 const startConfig = ( startRequest ?. params as { config ?: Record < string , unknown > } | undefined )
28872887 ?. config ;
2888- expect ( startConfig ?. [ "features.codex_hooks " ] ) . toBe ( true ) ;
2888+ expect ( startConfig ?. [ "features.hooks " ] ) . toBe ( true ) ;
28892889 expect ( Array . isArray ( startConfig ?. [ "hooks.PreToolUse" ] ) ) . toBe ( true ) ;
28902890 expect ( Array . isArray ( startConfig ?. [ "hooks.PostToolUse" ] ) ) . toBe ( true ) ;
28912891 expect ( Array . isArray ( startConfig ?. [ "hooks.Stop" ] ) ) . toBe ( true ) ;
@@ -2921,7 +2921,7 @@ describe("runCodexAppServerAttempt", () => {
29212921 const startRequest = harness . requests . find ( ( request ) => request . method === "thread/start" ) ;
29222922 const startConfig = ( startRequest ?. params as { config ?: Record < string , unknown > } | undefined )
29232923 ?. config ;
2924- expect ( startConfig ?. [ "features.codex_hooks " ] ) . toBe ( true ) ;
2924+ expect ( startConfig ?. [ "features.hooks " ] ) . toBe ( true ) ;
29252925 expect ( Array . isArray ( startConfig ?. [ "hooks.PermissionRequest" ] ) ) . toBe ( true ) ;
29262926 const relayId = extractRelayIdFromThreadRequest ( startRequest ?. params ) ;
29272927 expect (
@@ -3061,7 +3061,7 @@ describe("runCodexAppServerAttempt", () => {
30613061 const startRequest = harness . requests . find ( ( request ) => request . method === "thread/start" ) ;
30623062 const startConfig = ( startRequest ?. params as { config ?: Record < string , unknown > } | undefined )
30633063 ?. config ;
3064- expect ( startConfig ?. [ "features.codex_hooks " ] ) . toBe ( false ) ;
3064+ expect ( startConfig ?. [ "features.hooks " ] ) . toBe ( false ) ;
30653065 expect ( startConfig ?. [ "hooks.PreToolUse" ] ) . toEqual ( [ ] ) ;
30663066 expect ( startConfig ?. [ "hooks.PostToolUse" ] ) . toEqual ( [ ] ) ;
30673067 expect ( startConfig ?. [ "hooks.PermissionRequest" ] ) . toEqual ( [ ] ) ;
@@ -5145,7 +5145,7 @@ describe("runCodexAppServerAttempt", () => {
51455145 throw new Error ( `unexpected method: ${ method } ` ) ;
51465146 } ) ;
51475147 const config = {
5148- "features.codex_hooks " : true ,
5148+ "features.hooks " : true ,
51495149 "hooks.PreToolUse" : [ ] ,
51505150 } ;
51515151 const expectedConfig = {
@@ -5204,7 +5204,7 @@ describe("runCodexAppServerAttempt", () => {
52045204 cwd : workspaceDir ,
52055205 dynamicTools : [ ] ,
52065206 appServer,
5207- config : { "features.codex_hooks " : true , hooks : { PreToolUse : [ ] } } ,
5207+ config : { "features.hooks " : true , hooks : { PreToolUse : [ ] } } ,
52085208 pluginThreadConfig : {
52095209 enabled : true ,
52105210 inputFingerprint : "plugin-apps-input-1" ,
@@ -5217,7 +5217,7 @@ describe("runCodexAppServerAttempt", () => {
52175217 const requestCalls = request . mock . calls as unknown as Array < [ string , { config ?: unknown } ] > ;
52185218 expect ( requestCalls . map ( ( [ method ] ) => method ) ) . toEqual ( [ "thread/start" ] ) ;
52195219 expect ( requestCalls [ 0 ] ?. [ 1 ] . config ) . toEqual ( {
5220- "features.codex_hooks " : true ,
5220+ "features.hooks " : true ,
52215221 "features.code_mode" : true ,
52225222 "features.code_mode_only" : true ,
52235223 hooks : { PreToolUse : [ ] } ,
@@ -5257,7 +5257,7 @@ describe("runCodexAppServerAttempt", () => {
52575257 cwd : workspaceDir ,
52585258 dynamicTools : [ ] ,
52595259 appServer,
5260- config : { "features.codex_hooks " : true } ,
5260+ config : { "features.hooks " : true } ,
52615261 pluginThreadConfig : {
52625262 enabled : true ,
52635263 inputFingerprint : "plugin-apps-input-1" ,
@@ -5270,7 +5270,7 @@ describe("runCodexAppServerAttempt", () => {
52705270 cwd : workspaceDir ,
52715271 dynamicTools : [ ] ,
52725272 appServer,
5273- config : { "features.codex_hooks " : true } ,
5273+ config : { "features.hooks " : true } ,
52745274 pluginThreadConfig : {
52755275 enabled : true ,
52765276 inputFingerprint : "plugin-apps-input-1" ,
@@ -5284,13 +5284,13 @@ describe("runCodexAppServerAttempt", () => {
52845284 const requestCalls = request . mock . calls as unknown as Array < [ string , { config ?: unknown } ] > ;
52855285 expect ( requestCalls . map ( ( [ method ] ) => method ) ) . toEqual ( [ "thread/start" , "thread/resume" ] ) ;
52865286 expect ( requestCalls [ 0 ] ?. [ 1 ] . config ) . toEqual ( {
5287- "features.codex_hooks " : true ,
5287+ "features.hooks " : true ,
52885288 "features.code_mode" : true ,
52895289 "features.code_mode_only" : true ,
52905290 ...createPluginAppConfigPatch ( ) ,
52915291 } ) ;
52925292 expect ( requestCalls [ 1 ] ?. [ 1 ] . config ) . toEqual ( {
5293- "features.codex_hooks " : true ,
5293+ "features.hooks " : true ,
52945294 "features.code_mode" : true ,
52955295 "features.code_mode_only" : true ,
52965296 } ) ;
@@ -5750,7 +5750,7 @@ describe("runCodexAppServerAttempt", () => {
57505750 const resumeRequest = requests . find ( ( request ) => request . method === "thread/resume" ) ;
57515751 const resumeRequestParams = resumeRequest ?. params as Record < string , unknown > | undefined ;
57525752 const resumeConfig = resumeRequestParams ?. config as Record < string , unknown > | undefined ;
5753- expect ( resumeConfig ?. [ "features.codex_hooks " ] ) . toBe ( true ) ;
5753+ expect ( resumeConfig ?. [ "features.hooks " ] ) . toBe ( true ) ;
57545754 expect ( resumeConfig ?. [ "features.code_mode" ] ) . toBe ( true ) ;
57555755 expect ( resumeConfig ?. [ "features.code_mode_only" ] ) . toBe ( true ) ;
57565756 expect ( resumeRequestParams ?. developerInstructions ) . toContain ( CODEX_GPT5_BEHAVIOR_CONTRACT ) ;
0 commit comments