@@ -61,7 +61,7 @@ void call_defaultAgentPassesNullToResolver() {
6161 @ Test
6262 void call_withInvalidAgentAgentsReturnsExitCodeOne () {
6363 FailingTargetResolver targetResolver = new FailingTargetResolver (
64- new IllegalStateException ("Unsupported agent: 'agents'. Supported values: claude, github, cursor, opencode, gemini, windsurf, pi." )
64+ new IllegalStateException ("Unsupported agent: 'agents'. Supported values: claude, codex, github, cursor, opencode, gemini, windsurf, pi." )
6565 );
6666 RecordingPipeline pipeline = new RecordingPipeline (new SkillsInstallationResult (List .of (), List .of ()));
6767 InstallSkillsCommand command = new InstallSkillsCommand (targetResolver , pipeline , tempDir );
@@ -81,6 +81,7 @@ void call_withInvalidAgentAgentsReturnsExitCodeOne() {
8181 String stderr = errContent .toString (StandardCharsets .UTF_8 );
8282 assertTrue (stderr .contains ("agents" ));
8383 assertTrue (stderr .contains ("claude" ));
84+ assertTrue (stderr .contains ("codex" ));
8485 assertTrue (stderr .contains ("github" ));
8586 assertTrue (stderr .contains ("cursor" ));
8687 assertTrue (stderr .contains ("opencode" ));
@@ -106,6 +107,23 @@ void call_withAgentClaudePassesClaudeToResolver() {
106107 assertEquals ("claude" , targetResolver .agent );
107108 }
108109
110+ @ Test
111+ void call_withAgentCodexPassesCodexToResolver () {
112+ SkillsInstallationTarget resolvedTarget = SkillsInstallationTarget .codex (tempDir .resolve (".agents/skills" ));
113+ RecordingTargetResolver targetResolver = new RecordingTargetResolver (List .of (resolvedTarget ));
114+ RecordingPipeline pipeline = new RecordingPipeline (new SkillsInstallationResult (
115+ List .of (resolvedTarget ),
116+ List .of ("flamingock-core" )
117+ ));
118+ InstallSkillsCommand command = new InstallSkillsCommand (targetResolver , pipeline , tempDir );
119+
120+ int exitCode = new CommandLine (command ).execute ("-a" , "codex" );
121+
122+ assertEquals (0 , exitCode );
123+ assertTrue (targetResolver .called );
124+ assertEquals ("codex" , targetResolver .agent );
125+ }
126+
109127 @ Test
110128 void call_withAgentGithubPassesGithubToResolver () {
111129 SkillsInstallationTarget resolvedTarget = SkillsInstallationTarget .github (tempDir .resolve (".github/skills" ));
0 commit comments